However… non-profit is largely a tax designation. In exchange for tax exemptions, non-profits can’t basically give their profits to shareholders.
While the IRS does outline general examples of what we think of as charitable organizations, and the thing you claimed probably isn’t terribly clean (they do specify that nobody should profit from it, and one could claim that the for profit OpenAI is profiting from the non-profit, so is Microsoft), being a non-profit generally says next to nothing about morals.
It’s probably closer to an academic institution spinning off a company from the product of its research, which happens quite often.