It makes them more comfortable before formally approaching you. They get an idea of how you would react to unexpected humor, the shy lot do get pierced real hard if your action in public was something that would go against their thoughts.
Also its a much better way to communicate the thoughts with the power of editing still in their hands.
They are probably nervous to talk and say something wrong. At least if they aim or text, they can look at what they said and edit it before they send it off.
Well for one some guys are geeks but other just are more use to texting than talking in person because their words might come out wrong. Even though that can happen in texting too.