Because privacy. Name any company with an online presence that asks for their user's phone number and I'll give you five reasons why that company can't be trusted with it. Data of this nature is a liability and should be treated as such.
And I'll still take SMS over "send the code to some other device that may or may not be within reach" which is one of the common alternatives. It's annoying enough at home, but if I'm on vacation or at the office, having codes sent to my iPad is a non-starter.