I'd be willing to bet that filling a glass straight out of the cow has little to no health risks....
But yes, when you factor in automated dairy methods, packaging, shipping, storage, etc....plenty of chance for nasty little bugs to hop aboard the milk.....