Note that Keith could have got his answer minutes sooner, and needn't have kept Tim waiting. In fact, Tim could have started thinking about the question right away!
People who do this are generally trying to be polite by not jumping right into the request, like one would in person or on the phone - and that's great! But it's not 1990 and chat is neither of those things. For most people, typing is much slower than talking. So despite best intentions, you're actually just making the other person wait for you to phrase your question, which is lost productivity (and kinda annoying).
The same goes for:
Just ask the question! 😫
If you feel it's a bit brusque to simply say "Hi" and ask the question, you can still preface your message with as many pleasantries as you see fit.
It may seem trivial, but asking your question before getting that initial salutatory reply also allows for asynchronous communication. If the other party is away, and you leave before they come back, they can still answer your question, instead of just staring at a "Hello" and wondering what they missed.
When done right - everyone's happy! 🎉