I agree that margins (which implies sufficient demand to meet those margins) are likely the main driver. Tesla can't build enough cheap cars for everybody by themselves. If Tesla really want to achieve their stated mission of pushing the entire industry to switch to electric, they are going to be a lot more convincing to the other automakers if they maintain high margins. Of course this only works as long as they have enough demand for the high-margin trims.
If Tesla is lying about the mission and really just wants to make money...well, then the high margins are still a great way to go about it.
Cheap cars can't happen without high volumes (especially if you want LOTS of cheap cars, which is of course the goal and makes the point even more obvious), so to get there all the automakers have to get on board and build volume EVs. There are many really nice EVs on the market these days, but so far (at least in the US) only Tesla and the 2nd-gen LEAF are volume cars. More are promised, like the Mach-E and ID-4, but not here yet. Much progress has been made, but the industry still has a long ways to go to reach Tesla's stated vision.
(Side note: high margins don't always result in high profits. You can have really high margins and still show a loss if you invest a lot in growth. So the fact that Tesla barely made a profit doesn't mean they can't sell lower-margin cars; they'd just have to make fewer investments. That said, I think everybody agrees that selling higher-margin vehicles when you can is better for business).