I like this question because I think leasing gets a bad rap as being a rental and renting is bad so don't lease. I, personally, have never bought or leased a new car, but leasing has it's place. One blind spot of the other answers is sales tax. Depending on your jurisdiction, buying a car isn't different than buying anything else and you'll owe sales tax.
In some places, like California, when you buy a car, you'll owe sales tax on the whole purchase price but when you lease a car you pay sales tax on the lease payments. California also has no other way of mitigating the sales tax. A number of states will asses the tax on the purchase price net-of a trade-in or other similar mechanism.
If you're buying an $80,000 BMW, and the sales tax is 9% that's $7,200 in just sales tax, due right now. This obviously gets worse if you do a zero down financed purchase of a car, now you're paying interest on sales tax, don't do that ever.
When you lease a car, you and the lessor agree to some amount of depreciation that will take place over the lease period to cover your use of the car. A rule of thumb is about 35% for 36 months. So rather than buying the car for $80,000 you're agreeing to pay the $28,000 of depreciation the car will experience. You agree to a usage limit, like 30,000 miles over the three years. You agree to keep the car maintained and in good shape; meaning you fix dings, dents and other damage. To that end the leasing bank may require you to keep very low deductible insurance. You also agree to fees if you don't keep up your end of that bargain. The lessor agrees to sell you the car after the lease period for the $52,000 remaining after the depreciation, this is your buy out price. After you add an interest rate (money-rate in lease jargon) and fees to the $28,000 of depreciation you'll pay something closer to $3,000 in sales tax over the course of the lease, and you don't have to pay it now.
It's for this reason that essentially all exotic cars you see, particularly in high tax areas, are leased. No one is parting with a $25,000 (or whatever) tax bill to pay cash for their Ferrari. Similarly, of you want to be in that new $80,000 BMW every three years in CA, you're not paying $7,200 in just sales tax every three years, you're leasing it.
With that in mind, some cars "lease well" which means the financing bank assumes a small amount of depreciation, while other brands/banks are more "lease to own" where a lot of depreciation is assumed and you'll have a lower, generally below comparable, buyout price at the end. As D Stanley points out, the cars that "lease well" will have a high, generally higher than comparable market, buyout price when your lease is over. To some extent, cars that lease well also incentivize you to lease your next car too. So when you're shopping pay attention to the residual value, different brands/banks treat this differently. If a Mercedes, BMW, and Audi all have an $80,000 sticker price and the same money rate of interest, they'll still have very different lease prices because of this difference in depreciation philosophy.
The sales tax issue is more like salad dressing than a meal in terms of benefit, and is really only something to consider after you've decided you're going to spend the money to be in newish cars every few years.
Assuming this is not a business expense, because leases have bookkeeping benefits in that context, it's probably more financially sound over the long term to buy well negotiated used or certified pre-owned cars, and never ever include fees or taxes in the amount you finance. Whether you're leasing or buying, the car is still going to lose 30-40% of it's value in the first 3 years. Generally, the only way to win with cars is to keep them for a long time. Newer, more expensive, cars command more expensive maintenance and repairs, more expensive insurance, and you eat depreciation for breakfast lunch and dinner. Whether you're paying interest on a loan, or a money rate on a lease, renting, or ubering everywhere, or whatever; a car is an expense. And, probably, the best way to minimize the expense of being in a new BMW every three years is to lease it. But, generally, the best financial move is to avoid the first few years of a car's life.