In this article by Mercola, discussing the hazards of some meat suppliers (specifically ground beef), there's this:
One retailer that does test their trimmings for E. coli before grinding is Costco, and according to The New York Times, Tyson will not supply them because they don’t want their product tested.
Wow. While I don't buy meat from retailers, typically, if I had to I think I'd go to Costco. And stay the heck away from Tyson brand!
Those for whom buying an entire beef (or parts thereof, ordered a-la-hoof) isn't reasonable, there are still ways to curb your risk. Obviously, shopping at Costco seems one step in the right direction. Grass-fed beef is the best choice; it's often also organic, but if I had to choose from a feed-lot animal steeped in antibiotics, chemicals, hormones, and belly-deep excrement and one steeped in antibiotics, chemicals, hormones and placidly wandering among green pastures, I'd choose the latter. Although most of the interventions used to prop up the health of a feed lot animal just aren't even necessary in a pastured one.
Also, cows eating grain (feed lot) have a change in their digestive pH, which causes E. coli to run rampant through their entire system. Not so with the bovine on grass and hay. Even IF the processor inadvertently drug the carcass through spilled manure on the slaughterhouse floor (and I BET that happens), your risk is far less if the cow wasn't eating lots of grain.
Oh, and ground beef comes from who-knows-how-many-animals, upping the chances for contamination, and every last little bit is exposed to everything, which is why you should cook your burger well. Save the 'rare' for the interior of a T-bone which hasn't had the same exposure.