They aren't, and as such, deciding to forego short-term profit by making sustainable decisions and practices is of course not illegal whatsoever, nor does any company ever get sued for it.