Which illegal barrier are you talking about? The App Store may be illegal, but on what grounds would there be anything illegal about preventing other companies from using your servers?
And note that they are not even discouraging third-party chat apps, on the contrary, they actively promote the likes of whatsapp, signal, telegram etc.
And note that they are not even discouraging third-party chat apps, on the contrary, they actively promote the likes of whatsapp, signal, telegram etc.