The people responsible for the opioid crisis also donated a lot of money to philanthropy. If people told us “no shady opioid practices, no philanthropy” we would all assume they were being absurd. Because that statement is absurd as the one you made saying that without Meta’s shady practices we wouldn’t have those open source projects.
Also Meta’s open source projects do have a benefit to Meta. If they didn’t, Meta would never open source them. It’s part of Meta’s business strategy.