The purpose of a bumper in a car is to absorb and distribute impact energy during collisions, protecting the vehicle's occupants and reducing damage to the vehicle's structure.