Also, because of the expensive infrastructure that can only be used by trams, there’s a permanence there that prevents future politicians from ripping it out to put more cars on for a quick political win with drivers.
Going back to point 1: having a line means that any route needs to be properly planned because you never have an escape hatch of “just stick them on the road.” Example: where I live, the council installed a bus lane and a cycle lane. Where it pinches in (planning fuck up), it dumps all the traffic into a shared route with 2 roundabouts and 5 exits, each with an insane amount of traffic coming to or from them. Buses that are forced to use that route are always late. It takes me just as long to drive as it does to take the bus, faster if you factor in me waiting for a late bus.