you’re right, the physics of how a car reacts when hitting a barrier at a considerable angle (moreso than simple wall riding) is insanely unrealistic and almost always ends with the car perpendicular to the barrier, or facing backwards, counter to all known laws of physics. This is not how a real vehicle would react — it’s clearly hard-coded behavior, probably to prevent bouncing off of corners to gain an advantage, which was very possible in ancient iterations of the game.
On the one hand, if it were a real race, your car would be too damaged to continue the race (and in some cases totally obliterated), so no matter what the game does, it’s going to seem fake, since implementing a realistic damage model is apparently totally off the table.
Besides, ending the race there isn’t an outcome gamers would desire. So they’ve got to do something that punishes the driver, but still allows them to proceed. Someone somewhere decided a hard-coded “crash” that points your car the wrong way was a more immersive option than for example forcing you to drive 50mph for five seconds like in GT4. Terrible decision, in my opinion. The hard-coded crash is far more frustrating and unfair.
Related gripe: there should be a visual countdown on screen before the game resets your vehicle! Often I’m turning the wheel to try to get back on track, when the game suddenly and without warning plops me back on a straightaway at speed, which of course sends me crashing into the barrier since I had the wheel turned. Idiotic design.