Every day I do a quick ABC check, giving the air, brakes, and chain (or in my case, usually a belt) a good once over before I ride off into the sunrise. Incidents like these are a good reminder that if you ride frequently you should check all bolts at least once a week - handlebars, chainring, crank, even the bolts that attach your cleats to your shoes. Fortunately my friend wasn't hurt, but you could end up damaging yourself and your bike if these things aren't tightened properly.
I should add that tightened doesn't mean as-tight-as-I-can-possibly-torque-it-and-then-some, it means following the instructions and using a torque wrench (or knowing from years of experience how tight something should be.) Overtightening is just as bad as undertightening.
Now, if you'll excuse me, I'm going to check my chainring bolts for the third time today.