It's not so much that Teslas have good resale values, it's that Tesla new prices have dropped a fair amount over the years ESPECIALLY with the MS and MX. So, comparing against what a new one is going for today may look like they hold their value well but when you compare against what the car had originally sold for new, it can be a different story.
However, there are still some decent values out there e.g., 2019 M3 Performance with 39k miles, FSD, extended warranty, clean history for $47,900 at Tesla (
2019 Model 3 | Tesla). A comparable new one today is over $18k higher.