The public is not aware of this, but academic science is more like a small business than being part of a vast university structure. An investigator is the business owner and the researchers are independent contractors, augmented by graduate students who go to the school.
In that sort of environment, where the life and death of the business is determined by beating other labs for a finite pool of money, while the government spends billions to try and increase the number of competitors who want to be in government-funded academia rather than the private sector, competitive instincts run high.
Sharing data either dilutes the strength of a research group or it allows a competitor to have a shortcut that another lab funded. Lose-lose.