I'm not sure why the hims investors ever thought that this was legal
Some of the most profitable ventures this century have been objectively illegal, but when you know you won't go to prison for violating the law, why would you care to follow it?
The charitable assumption is that investors weren't aware it was a problem.
They probably didn't, they just took the bet that this was one of the crimes that are currently legal, like crypto scams, environmental crimes, bribery, and tay evasion for the rich.