As an individual, you may wish to hoard all of your personal medical information. Doing so may provide marginal benefit or protection against some theoretical harms. However, much of medical science relies on large population studies. Is knee surgery worth it? Are breast exams? Do COX-2 inhibitors increase heart attacks? Enormous amounts of good could be done by having large datasets of entire patient histories available for analysis by all, assuming they could not be de-anonymized (if not, then the datasets have to be analyzed under contracts)
Whenever I visit the doctor and I am given a form asking if my data can be sent to some group to participate in a study, I always answer yes. Never once have I had any negative repercussions from doing so, and it is my hope that the data was used to publish scientific papers that added to net knowledge of humanity. However, I have to wonder if asking me for permission actually interferes with random sampling. Are people who give permission vs people who refuse statistically more likely to have other behaviors that may influence the results?