Not just "fucking up really bad." Used to emphasize the way that the really bad fuck-up harms or humiliates the person who fucked up. The idea of shitting the bed is not just a) that the person intended to do one thing but instead laid a giant turd but also b) that the person laid that turd in their own bed and now has to lie in their bed of shit.
Darlene merely laid a turd by flunking the algebra test. Mike completely shit the bed when he cheated on the test and got caught and expelled from school.
1. n. a fart
2. n. a purposeful fart (by the man) during sex
During lovemaking, Frank thought it would be funny to give his girlfriend a St. Louis Hello. The next day, Frank's girlfriend dumped him. (They were not in St. Louis.)