I don't believe that antitrust law applies here. There's no collusion, there's not cartels, the monopolization aspects don't really come into play.
Yes, they can't literally do whatever they want, but in this instance, it's their code, their servers, their data (in a sense), they're permitted to define how others may use it, and use it in a separate way themselves.