Most carriers, including T-Mobile, support a "NOPORT" feature to disallow porting your phone number:
https://www.vice.com/en/article/ywa3dv/t-mobile-has-a-secret...
https://www.vice.com/en/article/ywa3dv/t-mobile-has-a-secret...
That doesn't cover ports conducted online via unauthorized account access, though. Adding a similar note prohibiting account recovery assistance unless physically present is a good idea as well.
The main reason it's not, in my understanding, is because of a federal telecom law that states it should be easy to transfer phone numbers across providers.