(1) The law books were pretty expensive...but some minimum number of public libraries had copies of the books in their Reference (may not be checked out) sections?
(2) The expensive law books were pretty much all in subjects that didn't concern you - building code for steel mills, regulations for operating an ocean freighter, depreciation rules for oil refineries?
(3) "The letter of the law" was freely available - but it's a muddled mess of vagueness, insider jargon, "gotta be a lawyer to understand the mental framework here", and just so hellishly long that you would have to devote your life to some sub-sub-sub-section of the law (plus the administrative regulations based on it, rulings in related court cases, etc.) to have any chance of knowing and understanding it?
(2) See my other comment.
(3) That's bad.
You seem to present this as a trilemma, when it's not.
(4) Pay for the creation in some more sensible way, e.g. the same way more pedestrian laws are created. The law that says you aren't allowed to shoot people at will was also made by someone, and that work was not free.
But in the end, to me it is much simpler than that: This is a minor annoyance at worst. Imagine losing a family member due to ignorance or recklessness of others. Or prolonged, acute illness due to a misdiagnoses and subsequent medication complication. An engagement ending without notice because you answered a question innocently and honestly and it caused them to re-think the whole thing.
These are real problems.
When life is rosy cosy a three inch thick book costing $350 may seem like an outrage, but it really isn't.
This tactic is underhanded though in that it favors those who don't pay the tax and take risks without knowing the code (they have more money left if they win the gamble).
EDIT: plus, a "buy this law" tax is regressive: those who do the least work subject to this tax will bear the highest tax/unit of work costs. E.g. a private person remodelling their house will pay the same 300$ as the huge construction company.
It also creates a hurdle for new entrants, who don't have any existing connections from whom they could borrow the book.
When it comes to financing the research on law, there are ways that have better properties than those above (like a tax on work done).
ISO standards are often mandated and required to do business. The documentation can be large portion of the certification.