I used to work drive thru at a McD's in high school. Oh, the stories I could tell...
Anyway, because of my experiance there, I never, ever, drive away from any drive thru without checking my order first, including opening up the wraper/boxes to make sure what I ordered is acutally in the wraper/box. I was always the perfect employee (seriously!) but the some of the yahoo's I had to work with!
I think part of the reason it can be so bad at these places is that they litteraly drive their good employees away. As I said, I was perfect at my job. My drawer was never short, I always took orders acuratly and filled them accuratly, and double checked all bags before giving them to customers. I was polite, ontime, and had a flexable schedule. After a year of hard work, I got my review and my raise. They gave me an additional 5 cents an hour. That bumped me up to a whopping $4.30 a hour. A Target had just opened accross the street. They paid $6 to start. I had a new job with in the week. They had no desire to give their good employees insentive to stay, so of course, we all left (I wasn't the only one that wound up as a cashier at Target, even one of the McD's managers jumped ship!). So, they hire new people who don't know the job and screw it up. Meanwhile, customer service is at a barely acceptable level. But McD's, as a corporation, still makes billions so no one at the company cares.
As for restaurants that run out of stuff, it may not always be their fault, sometimes the food deliveries get screwed up and the restaurant runs short before it gets straightened out. Sometimes the restaurant is to blame, but not always.