So the way I'm reading the post is Tesla swapped out a battery pack for a 60 with a 90 and enabled the 90. Tesla, years later, discovers that even though the hardware for a 90 was installed it should have been software limited to be a 60. (I'm assuming that Tesla only made the owner pay the cost of the 60 battery swap even though they replaced it with a 90). They go and "fix the glitch" and set it back to the 60. Sin…
The odd part is the OP said it was "badged as a 90" which to me implies Tesla also removed the physical badges on the car and replaced them to indicate it was a P90. That, to me, really implies they wanted to make this a P90 car.
It was probably one of the previous owners, and them changing the badge without disclosing that it's actually a 60 seems to put the bad-faith blame on them.
Having said that, if I was going to drop $40k on a used car, I would certainly have inspected everything... the carfax, title, stickers on the car, maintenance history, with Tesla themselves, etc. Surely one of those would've hinted to the current owner that it's actually a 60!?