For anyone curious about this, it's a safety feature. The front of a car is called the "crumple zone" โ it's designed to crumple up in an impact, which absorbs a lot of the energy and means the cabin (the place where humans are) will experience significantly lower forces.
More info: https://en.wikipedia.org/wiki/Crumple_zone