How do dealerships get away with essentially passing on the downside and risk of warranties to mechanics?

Shouldn't it be the business that's shouldering the variability in income due to warranties, since they're the ones that sold the cars with them?

It seems similar to a hypothetical restaurant selling memberships with food, then paying workers less when customers buy food with the membership discount.

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.

In every aspect of their operations, dealerships are useless parasitic middlemen who provide no value to customers and exist solely because of protectionist legislation that they pay for with their rent-seeking. Why would you expect repairs and warranty claims to be any different?

Capitalism 101: maximize you profit paying the minimum to your workers. Increase the surplus value.