I agree with the OP... I find it incredibly irritating when friends (and I have a couple of friends who do this) stop listening / talking to me mid-sentence & turn their attention to their child who is doing some interesting thing or other, WITHOUT the child having requested their attention. The thing is, in my opinion friends are very important, and they shouldn't always come second- especially when this is done in a blatant, rude way- to one's child. I do understand of course that kids' needs often require immediate attention, but that's what a brief 'I'm sorry, I won't be a second is for'. What I actively dislike is parents who suddenly lose the skill to have an adult conversation about non-baby-related matters, and who feel their child is and should be the centre, the first consideration in everything. Well no, the feelings of friends are also very important, and should be respected.
It's a different matter (and I'm not unreasonable) when a toddler demands attention, in those circumstances of course it's easier/quicker to just respond, after quickly apologizing to the friend you're not talking to, & then return to the conversation. But this is a matter of common sense, and I think we would all agree with this...
By the way, in response to Anna, I think saying to a child 'just a second, I'm talking to my friend' IS modelling good behaviour. It is NOT instruction. I really don't see how constantly allowing interruptions is modelling any sort of good behaviour.
Anyway, as I said I'm completely with the OP in this... I