The dealership sells the car either way. Incentives change from time to time encouraging one over the other, but ultimately the dealership has offloaded the entire car in either case.
A loyal lease customer is basically an automatic sale every three years for the dealer.
Yeah from this perspective it is a great way to keep getting repeat business. Selling a new car to the same person every 3 years is about as good as it gets.
Leasing gets you into $400/month car for a $300/month payment. Now because you were expecting a $400 payment, the dealer can sell you a $500 car for $400.
This is absolutely how a lot of people shop. I'm not one of them; I have two leased vehicles right now both at around $200/month lease. These are $22,500 vehicles that to buy would have given me a monthly payment of $450/month. Last few years have had some profound lease deals on vehicles. When the first of my two leases is up next year I'll lease again, unless the brand (or some other) doesn't have any steals like I got this time, in which case I'll buy one of them out or get something else.
-----
Leasing is a tool, as is financing, as is buying new or buying used. Sometimes you need a hammer, sometimes a saw and neither one is necessarily better than the other.
You missed the part where when you go to turn in your car after 3 years, they inevitably find something to nickel and dime you on (over mileage, tires worn more than they'd like, dings). BUT instead of charging you, they will be nice and roll you into a new lease. What a great deal!
I have yet to return a lease vehicle. My father used to only ever lease. I have a co-worker who had a terrible experience with it and will never do it again (he had to dump the vehicle early because he had kids and got bent over a barrel on it, not surprisingly). Many people lease endlessly, and if brands were nickel and diming all the time over minute issues they would turn customers away.