On some railroad crossings you might only need to go off the crossing to get stuck in the tracks and unable to back out. Trying to get out is another 30-40 feet.
Being caught off guard when the car isn't supposed to do that is how to get stuck in the first place. Yeah, terrible driver trusting shit technology.