Most of the time it's not because they procrastinated and waited till the last minute to do their work. Sometimes it's because they're taking 5 AP classes that give out 2 hours of homework each and you're trying to juggle all of that plus you play a sport or are in band or choir. Most of the time it's because school is just too fucking much.
End rant.
I played football and took multiple AP classes during high school. I'm currently doing my masters right now and still have about 7 hours of sleep. Honestly, I really think people just exaggerate this "2 hours of homework" per AP class since my usual AP homework took 1 hour max and have never pulled an all nighter even during my undergraduate years. Don't take this as an insult. We all have different education experiences and I was obsessed with perfecting an organized daily schedule everyday so there's that.....
End rant.