Using legal data to help understand societal problems

If we captured all there is to capture in the files and cases, including all legal documents, we could understand things better from a holistic perspective to prevent detrimental stuff in our society from occurring in the first place. Too often, when the case is closed, the information and data contained therein get lost in a box somewhere in storage. It is the most ridiculous practice. Instead of using this information and data to acquire knowledge about the multidimensional functioning of society, we keep it locked up. We must capture all the information over time in legal cases and give information to researchers so they can find patterns of who, what, when, where, and why so that we can prevent problems in the future from occurring. Imagine what a world this would be if we used events that happened in our society as nothing but a constructive, continually learning adaptive process.