This is a real big problem in these kinds of situations.
To give you an idea of how this happens: when I was in college, I worked at a pizza shop. It was Thursday. I got paid Friday. I thought I had $20 in my bank account, but I didn't realize that day was the day that my World of Warcraft subscription was up, and that was $15. During the course of the day, I bought lunch, a snack, and some pencils or something. All that total was less than the $20, it was something like $10 for lunch, $2 for the snack, and $5 for the pencils. So I was good.
I wans't good. They applied the charges like this:
Starting Balance: $20
WoW: -$15
---------------------
$ 5
Lunch: $10
---------------------
-$ 5
Overdraft fee: -$35
---------------------
-$40
Snack: -$ 2
---------------------
-$42
Overdraft fee: -$35
---------------------
-$77
Pencils: -$ 5
---------------------
-$82
Overdraft fee: -$35
---------------------
End total: -$117
Now, what sucks is that if they had processed them in a different order, it would have looked like this: Starting Balance: $20
Lunch: $10
---------------------
$10
Snack: -$ 2
---------------------
$ 8
Pencils: -$ 5
---------------------
$ 3
WoW: -$15
---------------------
-$12
Overdraft fee: -$35
---------------------
End total: -$47
Still an expensive mistake on my part, but it's more subtle than 'made a bad choice.' I was able to convince the bank to refund two of the fees so I was only out $40, but that extra $70 was a _massive_ amount of money to me at the time. It basically meant that I could only exactly squeak by for the next month, since that was basically all of my discretionary income. You can construct a similar situation which would have forced me to then take out a payday loan to make my bills, had I made one or two more mistakes in that same timeframe.