For millenia, the only way to create a strong, durable, and fireproof structure was to build it out of stone or brick. Needless to say, this required plenty of time, material and effort, not to mention a lordly budget. But for most of man's history, this tried-and-true ancient method had to suffice.
There was finally a tantalizing glimmer of change in this situation toward the end of the 18th century, when a material long in use for other items -- cast iron -- began to be used in building. Pound for pound, cast iron was much stronger than stone or brick. Since it was cast in molds, it could be cheaply mass produced. And lastly, cast iron wouldn't burn.