I'm sure the various engineers, scientists and The One Thande can explain the details, but the basics as I understand them from TechHist are:
- corrosion. Heat and water are hell on all metals, especially on iron, and will corrode it at an alarming rate. There are several ways of getting a handle on corrosion, with the simplest being frequent replacement of parts. You can also use more sophisticated alloys and ultimately, precious metals. Of course that limits you in other ways because most precious metals are lousy for bearing pressure. But with the technology of antiquity, you can't reliably produce high-grade corrosion-proof metals, and even your best bet - various copper alloys in the bronze/brass spectrum - is iffy, not to mention expensive.
- quantity. The ancients could make high-grade steels, but they couldn't mass-produce them. It isn't even certain whether they had procedures to follow or graded iron post-production. They also had no way of making even lousy iron in the quantities that made it a disposable material. Ancient technology uses metals, but it doesn't use them up. That means that you have neither a reliable supply of high-grade metal to make machine parts nor a steady flow of lousy pig iron to make disposable boiler plate out of.
- reliability. Grading metal and computing the forces acting on it was an art in the ancient world. Some people got very, very good at it. But there was no textbook you could consult to tell you that X pressure needed Y mm of Z grade alloy to be safe. There was no Z grade of any alloy, either.
There were remarkable things done in antiquity. Engineers could and did construct pipes bearing pressures the equal of modern machines. Pneumatic catapults were designed with cylinders built to tolerances in the hundredths of an inch and the pressures inside brought the air near flaming point (observers report there were sparks flying and the cylinders were colled with water and steamed). Complex steam- and heat-expansion-powered machines were made. The problem is that these were made by genius c raftsmen with a highly refined skill at judging and working metals. The steam engine economically depends on making them in mass and cheap and user-friendly enough to run in a mining village near anus mundi. That was beyond the ability of the ancient world. The commonplace tech tree says: for steam power: puddle iron. For puddle iron: coke and pig iron. For pig iron: blast furnaces. For coke: mineral coal.
China has large deposits of iron that can be smelted at more user-friendly temperatures using unrefined mineral coal. That is a workaround.