It's relatively easy to keep a bicycle upright when the rear wheel locks up, just keep steering a straight course until you come to a stop. Locking up the front wheel almost always ends in a crash.
Locking the rear wheel becomes very dangerous on a motorcycle, if it occurs at speed, and if you release the rear brake before the motorcycle has come to a stop. Releasing the rear brake will allow the wheel to regain traction, and cause the motorcycle to kick up, throwing the rider off. This is know as "highside" crash and can be fatal.