Apart from that, why invest in charging infrastructure? Probably because, even though we've made it inconvenient to drive, some people insist on owning a car in the city. Maybe they are just being idiots, or maybe they need it for their work/business. If we don't make it more convenient to go electric, they will just stick with gas cars. Every little bit counts.
Trains, yes sure, but people love the convenience of a door-to-door service. I think Elon's idea of electric robotaxis and tunnels to alleviate traffic is not a bad one. It could work. We could also eventually have hyperloop "pods" that route themselves in a network tunnel underground. This would make it possible to avoid having to transfer from one train to another multiple times. Sounds sci-fi? Sure, but without a vision, there's no innovation.