The real purpose of the shock absorber is to keep the car from bouncing up and down. When you hit a bump, the shock is meant to allow the wheel(s) to absorb the bump and recover quickly so that the car stays under control.
Car Struts are used on the front end of nearly every front-wheel-drive vehicle. They are more than shock absorbers and with a different name. As the strut is able to integrate the different components all into one assembly, a strut actually serves multiple purposes. With its spring it is able support the weight of the vehicle, while it is moving so that it can adapt to the road irregularities. The internal shock absorber will dampen the movement of the spring as it compresses and rebounds itself whilst the vehicle is traveling.