Yes, it did. Despite all its shortcomings the invention of law has had a pretty obvious positive impact on our civilization.
Instinctive dismissal of government regulation like it could never solve any problem is a bias. Pretty common in tech circles, but still.