Roof moldings in cars serve both functional and aesthetic purposes. They primarily act as a weather seal, preventing water and debris from entering the car's interior around the roof edges, and also contribute to the vehicle's overall design by hiding seams and providing a clean, finished look.