Assuming Tesla eventually "catches" someone using a Tesla for ride sharing profit outside of their network they could remotely disable the car, at which point they will surely be sued and the courts will decide.
And they will very likely decide against Tesla, IMO. The immediate reaction to this statement is bound to cause people who work purely in the software realm to protest, but to most courts software is still a very nebulous thing. Disabling someone's car (after selling it to them outright) because they did something with it that you didn't like is EASY to understand, anathema to the entire history of car ownership and I really don't think it'll fly.