Crazy to think the people who wrote this shady script probably reads HackerNews. This is all kinds of immoral.
Also, don't look towards the engineers, who may or may not have known. Look towards the money. Who are the VCs invested in them and how many of them knew and encouraged that in the name of growth? And, of course, the executives.
Also there is legality and then there is ethics. Something in the contract might be perfectly legal, and yet unethical.