Generally, on EV's where tech changes on an almost daily basis, leasing is a good option. In today's very unusual market where manufacturers are struggling to build cars due to chip shortages, used cars are high in demand. But, even with Tesla's in the past, once new major functions were released on newer versions, the older cars declined significantly in value almost overnight. Most notably when AP1 came out. Then again when all cars were upgraded to AP2 hardware.
I've always done the math. For someone like me who is ready for a new car after 2-3 years, simple math always added up to a lease being lower in cost that a purchase when you simply add up how much you sent from the day you walked into the Tesla store to pick up the car to the day you turned it back in at the end of the lease. Leases have lower payments, lower down payments, pay less in sales tax and for many, that use them in their business, are better write off deductions. For me and my particular use, a 3 year lease always ended up being in the $5,000 to $8,000 range less than if I had bought the car, sold it and paid off the balance of the loan.
And more importantly, for someone like me that does go through cars every 2-3 years, it also protects you from the major value drops when Tesla releases a new feature that your older car is not capable of. In 2013 it was new battery technology. In 2014, was AP1. 2016, AP2. The prior models all took a hit in pricing. Also, add to that, the fact that Tesla can, and often does, choose to instantly reduce their pricing by large amounts. There were people that paid near $170,000 for a loaded Ludicrous P100D. Just a year or two later, you could get a fully loaded Ludicrous car for around $110,000. Those that financed their $170,000 cars still likely owed $130,000 on their 2 year old car when you could go buy a brand new one for $110,000. Those people got killed in terms of value when Tesla slashed the premium for the Performance version from $45,000 to $10,000. Leasing protects you from all of that as you couldn't car less what happens to pricing or new features or if the value on your car plummets.
Naturally, it's not for everyone. Those that keep cars for more than 5 years. Those that drive over 15,000 miles per year.
While not possible on the Model 3 or Y, at least with the S & X, you always have the option to purchase the car at the end of the lease. In doing my math, in the very unlikely event that I chose to keep my car beyond the three year lease period and buy it, the end cost, from day one until the day it was paid off has always been very similar to the end cost if I had just purchased it instead of leased it. Your price to buy the car is locked in. So you can always choose to buy it if the value is higher than the residual amount.
I like the leasing because it offers so much flexibility, better tax deductions and provides a zero risk aspect. Look at the Cadillac ELR (I think that was it?, the glorified version of the Chevy Volt). Those things sold for $70,000 plus and you couldn't five them away for $20,000 three years later. Leasing was clearly the better choice if you wanted one of those cars.
Another benefit, I've never had to worry about long term with my cars. Not that I do, because I have no need to, but if I wanted to, I could charge it to 100% every day and not have to be concerned about what it may do to the long term health of the battery.
I've always preferred true "luxury" cars. But, chose the Tesla for the past 9 years because I loved the amazing tech. I was willing to sacrifice the "luxury" items for the latest and greatest tech. Has been well worth it. But, for as often as that tech changes on these cars, leasing also makes it easy for people like me that always want the latest and greatest the car has to offer, to upgrade every 2-3 years without having to worry about being upside down in the loan, as most cars still are after just 2-3 years. Finally, the repair costs on a Tesla are astronomical if you're not under warranty. Leasing a car for 3 years ensures that I never have to worry about the cost of any repairs it may need. I'm always under warranty. I've been fortunate with my last few Tesla's in that they haven't seen the shop for any repairs. A couple minor things that Tesla sent out the mobile Ranger to fix. Thus, aside from just the cost factor of expensive repairs, a new car generally has fewer things go wrong than does an older car, therefore am rarely inconvenienced in having to take the car to the shop or deal with maintenance.
In the end though, all the other stuff are just cherries on top. The biggest decider for me has always been net cost from start to finish. For me and many with similar use preferences, the bottom line is, the three year cost of a lease is less, start to finish, that a purchase.