The same way Apple is allowed to do it presumably.

It's not.