Appreciate the complexity of billing codes, these are not created by hospitals but by by the American Medical Association, Center for Medicaid/Medicare and a soup of other organizations. There are tens of thousands of procedure and drug codes (things that are done or given) and tens of thousands of diagnostic codes (reasons justifying the procedure), creating a space well into the quadrillions of possible routine combinations. That's a large restaurant menu.
There are a number of other comments comparing hospital pricing to retail type interactions. It is also important to consider that hospital interactions involve unexpected and unknown things that aren't easily captured in a pricing context before you get there.
From an instution standpoint there are some bad apples but a lot of organizations that are not complying are not complying because they are facing technology and operational issues that are stopping them from complying. From the trenches in my consulting practice one example is an institution whose has a core element of their billing system, that is largely a black box even to them, using technologies that are decades old. Why would someone continue to rely on that? Because it has direct integration with critical partners and counterparties that was set up decades ago and that continues to work.
Replacing it is underway but is costing 8 figures and taking years. The potential fines are small relative to that and there isn't much they can do to comply in the immediate term anyway.
For context understand that Medicare billing routinely involved actual physical dial-up modems somewhere in the chain (even if it was invisible to you) until late 2018.