The infrastructure for railways is considerably more expensive to build than a BRT, even with the dedicated lanes required for it to be fast.
A middle ground are light rail and tram, but those tend to be slower than a bus based-BRT system as the cheap rails don't support speeds as fast as a metro or railway.