That's a general problem in health care and why governments should be more involved in funding and supporting these kinds of solutions.
I'm pretty sure if they had gone with curing all the world's cavities I would have heard of them. The brand recognition alone would be worth more than a probiotic mouth wash company.
Very unlikely there was a miracle cure that was left on the table because founders wanted to sell mouthwash.
This is an obvious scam
- To lower their costs - by outsourcing a chunk of development and testing to free volunteers; also by improving quality and reducing on-boarding costs of new hires (as you can select for those who already spent significant personal time learning your tech stack);
- For marketing purposes - mostly in terms of marketing to prospective employees, but for companies targeting technical audience, also marketing to customers;
- As a weapon against competition - the code you open-source is code your competitors can't sell; this is useful both in breaking into a legacy market, as well as restricting the kind of competition you'll get from those who started after you;
Where does the money come from then? Usually some combination of venture capital, rent-seeking and advertising. Open source destroyed the viability of the simple, honest model of providing value in exchange for payment. The alternative business models are much worse for end-users and society at large.