Mid to long term research probably doesn't pay off inside the patent window so what does it matter? If I discovered a technology that's 30 years from adoption who cares if I can get a patent? It will be expired by the time I have any ability to make money from it.
Drugs usually have about 7 years on their patents before generics can hit the market. Since it costs sometimes hundreds of millions of dollars in R&D for one drug to hit the market, the patent period is extremely important.
Particularly since the drug must clear the FDA and there is potential for recall.