Cars are definitely designed for safety, they're just not
exclusively designed for safety. The answers to that particular requirement are disappointingly mundane: reduce speed (ideally to 0) and reduce the transferred forces on the people inside/outside.
Taken to an extreme, that leads to a vehicle no one will buy. Even a more reasonable approach struggles to find buyers, as saab discovered. Car buyers have a strongly revealed preference for the feeling of safety over the actual practice of it.