Far less maintenance, and it’s generally directly supported by rider fares instead of petitioning for government tax money.
Also the density of passengers on transit justifies the costs. 90%+ of all cars have a single person, whereas transit is on average magnitudes more. On that basis alone transit is far far cheaper.