All companies run everything by their lawyers and still they are found doing illegal stuff from time to time.
In this case, my point is not that this is legal or illegal. My point is that they probably ran this by their lawyers and at the very least those lawyers probably said "yeah, you have a reasonable case if this goes to court". If the lawyers said "yeah, this is definitely illegal, you are going to get sued, it's an easy case and you are going to lose", then sure, it's possible that Twilio decided to do this anyway, but I don't see that as likely. They probably have at least a legal theory on why this is permissible.