As we all know spam text messages aren't a thing since it's very costly and hard to spoof cell phone numbers.
Such checks, although not perfect, do prevent a huge amount of spam and bots by having a very real cost for bots/spammers, and essentially no cost (other than their privacy) for the user.