You have to lay tracks for a tram though, means changing the route isn’t that easy. Self-Driving buses would actually be more efficient since you could alter the route on a hourly basis if you wanted optimized by traffic and destinations required.
All that could be easily automated, but you lose that if you have a physical track you have to run along.