When you open your own car dealership you can accept PNO vehicles that need to be smogged.
Dealerships/Tesla have the right to accept or deny trade-ins based on their own discretion. You’re upset Tesla won’t take your trade-in, even though they have the right to do so.
If you’re not happy with Tesla, go take your car to CarMax, Carvana, etc.. and see if they accept it.
Or, sell it privately for more money. I have a feeling most buyers would be turned off once they find out the car hasn’t been registered for years and still needs to be smogged. That would set off red flags in any used car buyer’s mind. Even if your car is pristine, I would probably avoid buying it based on the registration and smog unknowns.
As you say, the car may be technically and legally ok to sell. That doesn’t mean anyone wants to touch it though.