You're implying that putting capital towards having the "best" railway is the most optimal use of that capital. I think it's much more complicated than that, and coincidentally, market mechanics are one way of crowdsourcing the decision of how capital is put to best use.
I'm not saying it's always the best solution and free markets going unchecked can for sure cause more harm than good, but I think you're making it out much simpler than it really is.
There are more people proffesing their beliefs in this thread, than in most discussions about the Catholic church.
In this entire thread noone considered - "let us have a look, which country has best railways" and maybe learn from Spain and China.
In public discourse, ecomomy is treated like a religion.