If we presume that this position were true, how would you explain the fact that commercial pharma companies have invented, and continue to invent new antibiotics, antifungals and particularly new vaccines which are intended to actively *prevent* illness and death, including some common causes of cancer like HPV?
Frankly there's a shitload of money in cures. And keeping patients alive by prevention, cure or treatment means you can sell them other stuff later - so they're all good.
But more than that - it's the right thing to do and it's often personal.. mostly the individuals doing the research really want to help people. You don't become a medical/pharma scientist for the flashy lifestyle (hah) or the opportunities to be evil. You may doubt it but the regulators (science, medical, fianncial, etc.) are actually all pretty much down on evil. And let's face it there are lots of opportunities to be evil without getting an extensive, expensive, education, and working in a field that's subject to public opporbrium at every turn even while you daily work for the public's health and welfare. Quite a lot, probably most of the researchers go into the field because it's a rare chance to make a positive difference to large chunks of humanity.
Remember the people who work in pharma are just that - people. They are also patients themselves or relatives/friends of patients, they're users of their own products, as well as being employees, shareholders, perhaps managers and members of broader society.
They also, somehow, have to find ways to do all that good while running a financial machine called a company - so they have to pick and choose where they put their effort to both do good and self-sustain that operation.
That's why government funding and foundations like the Bill and Melinda Gates foundation are so important - where some disease area couldn't become a sustainable financial prospect for a pharma company, those funders can help to get the science done by drawing on money generated elsewhere.