It would be great if laws worked like software deployments:
1. Roll out law to 2%, look for any obvious unintended effects (like we check for crashes)
2. Roll out law to 50%, study for effectiveness. Is the intended positive effect happening in the experiment population? Any effect on the control population?
3. Finally, roll out law to 100% and keep monitoring.
4. Be ready to roll back to 0% if failures seen at any stage.
5. Be ready to apply a zero day patch after it's at 100% if edge cases are found.
But, we don't do any of this! Lawmakers make a law and yolo it into production on a fixed date, and it's often impossible to roll it back or modify it.
We do sort of do that, with state laws. Different states try out different laws, and copy laws from other states. Ideally a state will repeal laws that don't work well, and copy laws from other states when they work well. In practice it's all a mess of course.
California is the experimental group.