Tesla's robotaxis are not trying to replace public transport, they are trying to replace taxis, and eventually private cars. Uber made taxis more accessible and it scaled plenty, perhaps Tesla can do the same thing, in principle, with another degree of accessibility and cost-effectiveness. If anything, they may reduce the number of cars on the streets if more of them are shared.
I haven't yet formed a strong opinion on the viability of their vision, but that's beside the point.
Public transport is the last thing they will replace, and it is to a large degree complementary just like it has been for the last century. Public transport is of course far more efficient if you are willing to sacrifice a bit of immediacy and, well, interacting with the public. For the rest there's the private transport option, with various degrees of who drives and how much you own the car, that's where Tesla is aiming.