They absolutely design cars with some pedestrian safety in mind. That’s why hood ornaments went away and bumpers moved away from solid steel.
I don’t remember the exact numbers, but they have a metric along the lines of “X% of pedestrians survive impacts up to Y speed” that they need to meet.