Friend of The Food Geek, Steinar, asked via The Twitters:
There are three major reasons to cook something to a specific temperature: flavor, texture, and safety. When we choose a temperature to cook something to, it's usually for the first two reasons; some people like steaks that are cooked all the way through, and some people like steaks that were waved gently near a fire, but not too near. When the government tells us what temperature to cook something to, that's for safety reasons.
Bacteria and viruses* live on the outside of most food, especially dense food such as meat, eggs in the shell, and the like. So when you're cooking a steak, for example, the goal is to kill all the bacteria on the outside of the food. When you pasteurize an egg, you are heating up the outside of thelight shell to kill the salmonella, you aren't doing anything to the egg inside. That sort of thing.
When you make a hamburger, though, you are using ground meat. This means that you're taking all the inside meat and turning it into outside meat, while simultaneously touching all of that previously inside meat on the outside meat. So if you go to a store or a restaurant where meat has been pre-ground and stored in potentially questionable conditions, you need to ensure that any bacteria that may have had a chance to replicate will be killed, and they way to do that is, for beef, to cook it to medium-well. If you bought a steak at a butcher, brought the steak home, ground it yourself, and cooked the hamburgers right then, you would be safe to eat them at medium rare.
So what's the deal with the waiting time? Well, bacteria are everywhere. Good bacteria, bad bacteria, they're all over the place. But a little bacteria doesn't hurt anything, because bacteria like to wait until they have enough friends around before they do anything like releasing toxin. So if it's just a few bacteria, you're fine. If the bacteria get enough time, enough food, and the right temperature range to multiply and hit that quorum necessary to activate, then you will get sick. If not, you'll be fine.
So, food for bacteria is more or less the same as food for people. The ideal temperature range for most bacteria that will cause us trouble is 40°F to 140°F. If bacteria are on something tasty to them in that temperature range for a couple of hours, then the food is dangerous. Cooling the food only slows the bacteria, so if it were in the "bacterial danger zone" for an hour, back to the fridge for a day, and then heated up to over 40° but under 140° for a couple more hours later, then you would likely get sick eating the food.
All of that, together, is why steaks can be rare or medium-rare and hamburger should, under most circumstances, be cooked to medium-well.
*- No, not viri or viropodes or anything silly like that. Why not? Watch this YouTube video.