Profits aren't necessary for R&D, that's just one model where R&D is funded by consumers through direct purchases. Another model is where R&D is simply funded through taxation and grants. That is the model that medical research is often funded through, and it works well because it allows researchers around the world to help our species overcome disease.