Sending and receiving non-iOS/iMessage texts require your phone to be near your computer. I don't believe any company sends 2FA codes to you through iMessage.
I've never seen this behavior with my own devices, and cursory searching turns up similar results. Certainly I could be wrong, so can you point me to any references that describe the "proximity not required" behavior?