Assuming he was hit from behind (correct me if I'm wrong), and assuming he had a car in front of him:
Never stop directly behind cars. Ever. That's the smush-zone. Always stop off to the side of the lane, so you can move up between the cars if you have to.
Always have an escape route (or several) planned. Always. The fact that there was "too many cars in the intersection" for him to move forward means he didn't plan an escape route, let alone multiple routes.
Always have the bike in gear (debateable, depending on how fast your reflexes are). First gear, clutch in, ready to pounce.
Always be watching 360 degrees around you. Pretend you're invisible. Pretend that the car coming up behind you is going to pull into your spot, to get closer to the light. In this case, surprise surprise....it did just that. At a red light, the majority of the danger is coming from behind. Watch your mirrors. Even if cars are stopped behind and around me, I'm still watching to make sure the cars behind THEM are slowing down fast enough. If not, I have zero issue with lane-splitting to get out of the crumple-zone.
Need I continue?
EDIT: At the end of the day, you ride long enough, you will take a hit or eat pavement. However, the worst thing you can do is say "There was nothing I could have done to avoid it." There is ALWAYS something you could have done to avoid it. You're human, you're not perfect. You will get in an accident that you could have avoided if you just did XXXXX. But, as long as you recognize that you could have done XXXXX, you have a much better chance at avoiding that accident in the future. If you sit back and say, "Well, there was nothing I could have done", you're all but guaranteed to have the same thing happen to you in the future, provided you ride long enough.
Answer me this RPMDAD: Does your friend do anything different now, when he's in the exact same situation? Stopped at a red light, cars coming up behind him.... If he does, there's your answer right there....