Most of the time and places a city doesn't need that capacity. Since your rail cannot get the garbage from my house, or my new bed to the house, we need roads as well. Thus for most a bus running in mixed traffic (remember most roads do not have heavy traffic!) is good enough and a lot cheaper. Where you need capacity a train is really good, but you don't need it.
That said I support trains in a lot more places because trains can run fully automated and thus in the real world can achieve the high frequency people need to choose transit even when a car isn't a problem to own (they can afford it and there is no traffic). This is however just a stop gap since self driving buses don't exist (yet?). In most "first world" countries cost of labor is high and automated trains are thus useful in places where a bus could do the job.