Because dealerships sell cars but don't build them. The warranty really should be from the manufacturer, not the dealership.

They get away with passing the risk because they're already apex parasites who have successfully inserted themselves between carmakers and customers, and lobby like crazy everywhere to protect their position.