Railroads revolutionized transport and yet railway mania was undeniably a bubble. Something can be both very useful and yet also overvalued and overhyped leading to significant malinvestment (sometimes, everyone wins to the detriment of the investors, sometimes just everyone loses out because a huge amount of effort was spent on not useful stuff, usually somewhere in between).