Heating water to make steam is not necessarily more efficient, but a lot more practical. What you describe is how internal combustion engines work, for example, so it's a valid concept. However, they do this in bursts and use liquid and carefully engineered fuel, which makes the implementation more practical.
In a continuous system as you describe, the fuel is burned at high pressure. Consider the mechanical difficulty of adding more fuel into the system while sealing against that pressure. You also have to get the unburnt waste out somehow.
While basic physics does not prevent what you describe, practical engineering does. It's simpler to burn the fuel at ambient pressure, and use the heat to make high pressure inside a specially designed pressure vessel. Put another way, it's a lot easier to get heat across a pressure seal than solids with somewhat unpredictable shapes and sizes.