The rationale I've heard is that consumers benefit from having a local service location for the brand. Based on that logic, the state limits the franchises to avoid "ruinous competition" (not my phrase) that would threaten that consumer benefit.
The first time I heard the phrase "ruinous competition" used this way, I nearly jumped out of my chair.
But this is why the OP mentions the challenge that Tesla will have in providing local repair service. If it can crack that problem, it may open the door to manufacturer shops of other car models as well.