Totally unnecessary and is not how science works.
If you make data public before analysis, labs will get scooped with their own data. No one would invest in data collection.
Often things are found or worked out during the process, which can change week to week or month to month, iteratively. Experiments don't go to plan, data is cooked and can only be used in reduced ways etc. Researchers are meant to share their raw data anyway which should prevent this sort of stuff. Basic statistical analysis on datasets usually reveals tampering.
The issue is the insane academic standards and funding bodies (public grant $) which reward high volume and high 'impact' work. These incentives need re-evaluation and people should not be punished for years of low activity. Sometimes science and discovery just doesn't work the way you think it will, and that's okay. We need a system which acknowledges that which everyone in science knows.
If only there was a group of elected officials who could legislate and regulate industries who hurtle us towards extinction in the quest for unending profit. Wishful thinking I suppose