It can be quite healthy, "practice" so we won't feel as anxious when we do talk to that person or so we can think of things to say in advance, etc., anticipate some of the possible questions or topics of conversation.
Or, it can be an escape; we talk to the person in our head and then "don't have to" in person

I use to do a lot of my therapy work in my head between sessions that way and sometimes it could get really ugly when I would have trouble in session remembering what I'd actually told my T or what she had actually said versus my imaginary head version.