Make model and year are critical. Engine size too, it that’s optional.
In this case, knowing whether it’s an automatic or a manual could be a factor too.
And how fast your were going.
But generally when you apply the parking brake it acts like an emergency brake and activates regardless of everything else. And, since it only stops the rear wheels, if the parking brake is powerful enough to stop the rear wheels while you’re moving, the ABS system detects a significant difference in the wheel speed between the front and the rear and activates. The horrible crunching sound is then made by the ABS solenoids pulsating the brakes on the wheels that are still spinning. The system works by rapidly opening and closing a valve that interferes with the hydraulic pressure to that(those) wheel(s).
The sound you heard could have even come from the rear brakes clamping onto the rear rotors (or pressing the rear shoes into the drums) while they’re still being driven by the powertrain. If it’s an automatic, you’d be momentarily straining the powertrain and the torque converter lockup clutch. If it’s a manual, you’ll be forcing the brakes to try to stop the engine from turning. Depending on the size of the engine, the power of the brakes, and the speed of the car, that could range from a scary annoyance to a really nasty powertrain jolt.