I’ve been Been in and around car dealership my whole life, my uncle was the general manager for one for years and now he has his own used dealership.
As far as new cars go, there’s about 100 different ways that can make money on them anytime front or back end, if they’ve made a deal with you. There’s a pretty good bet They made money on it even if you think you got over on them, you most likely did not.
Also, those loaner cars they were talking about the manufacturer basically gives the dealership money every month to put them in their loaner fleet so they make money on it even before they sell it back to you.