Because without patents and exclusivity, the return on the massive R&D involved doesn't exist. Naturally that removes the incentive for R&D (in the market as it exists today.)
The incentive is that they get to market first as well as the inherent value of the medicine. They could also be paid the cost of R&D or a market price for the initial release of the information rather than a royalty (ransom model).