Actually, laws are kind of hidden behind paywalls! For most laws, I wouldn't trust my own judgement on their interpretation and would have to pay a lawyer.
This always struck me as the dagger into the idea of freedom. How can one follow the law if one is not fully informed of the law?
Of course, those with money like it this way. It's a barrier for competition and exercising your rights.
Once you start looking at barriers, such as ISO, you start noticing them everywhere. Real estate, dentistry, doctors, school teachers. You can't even cross state lines as a school teacher, or other professions. People often argue that software developers should be licensed much like engineers. Let's be thankful that's not the case. Imagine the headache of being remote and having to get licensed in multiple states!
There's an important distinction here. Laws (and court decisions) are freely available in many (most?) places. Relevant commentary on how these laws are applied tends to be more costly.
I'm not very familiar with the situation in France, but I can offer a data point from Switzerland: The civil code is (of course) freely available online and in PDF format. A printed copy is available for CHF 15 or so¹, both from the federal press and from other publishers who might throw in an index or a keyword reference at the same price.
However, if you're actually looking to apply any of the contents, you'll want qualified explanation and references to jurisprudence alongside the legal text. Affordable commentary² on the civil code start at CHF 250 or so, and the industry standard "Basler Kommentar" to the civil code is sold as two volumes, retailing for CHF 598.- each.
¹ It's a few hundred pages; IIUC the price pretty much reflects the cost of printing, binding and logistics. Key point: Nobody is getting rich off of selling these.
² For the civil code, specifically, you'd be in luck: Some consumer advocacy organizations publish hands-on guidebooks that are significantly cheaper than the usual commentaries. So you might get by on CHF 100 or so. But these tend to not be available for other, less mainstream, laws.