So, I've been thinking about this and finally realized I need to RTFM:

lets say, the materials are all scanned down, and they just tile them to fill in what ever part you’re trying to fabricate. lets say they’re 1 cm3 cubes of materials. sure, the computer could tile those cubes digitally, and then cut them back into the shape you needed. But, how do you handle the gaps between the blocks? you could fill them with procedurally generated molecules/atoms, right?
So, kind of. Page 91 says "The chief limitation of all transporter-based replicators is the resolution at which the molecular matrix patterns are stored" and "extensive data compression and averaging techniques are used" which results in "single-bit inaccuracies".
I think the implication is that objects are reproduced in essentially arbitrary blobs/fields which are of uniform molecular patterns (e.g. the flesh of an apple being distinct from the skin, the stem, or the seeds) but not in blocks/voxels.
you wouldn’t need to scan materials. You can just model the atoms and procedurally generate the bonds, and then tell the replicator how to print the damn thing.
The problem is that specifying the exact molecular structure of something complex like, say, a soufflé, would be extremely difficult and time-consuming to do manually, and probably it still wouldn't taste or feel right when you ate it - imagine trying to reproduce a Monet by specifying manually in lines of code where each drop of each color of paint was placed on the canvas, without being able to see the finished product until you hit "print" - it would take you years, maybe decades to get it right. Getting the texture and flavor of a grilled chicken breast right would be insanely difficult to do by specifying each atom in the whole structure from scratch. Scanning a real one would be a much easier path to acceptable reproduction, hence: "a quantum geometry transformational matrix field is used to modify the matter stream to conform to a digitally stored molecular pattern matrix." (Treknobabble but the point being that a thing is scanned and the pattern stored digitally for later reproduction)
we know what an iron atom is and can model it.
So yes, especially for industrial applications such as your example of a uniform steel bar, but for things with complex chemistry and physical structure it's too difficult to specify from a "first-principles" perspective and get something that you actually want to eat.
Maybe a higher-grade, specialized food replicator could generate food items procedurally as you suggest, or maybe it would just have a group of stored patterns for the same item that it would randomly select from (probably easier) so that the output isn't always the same, but probably the standard Starfleet model doesn't do this as it would be more of a luxury feature.