Not an easy question because it stems from all sorts of problems, and usually it is a combination of things. People tend to not fall into this from one single source alone.
It could be something as simple as what I sometimes experience: quiet is disturbing to some cultures. While I CAN appreciate quiet, I find that I don't generally without a need for it or without a particular event going on that commands some respect for quiet. My house was a busy one, and I grew up in it. People in and out constantly, lots of siblings, lots of friends that lived literally across the street, we took in strays sometimes both animals and people... It's our way. My parents weren't the type to stifle children being loud or anything like that, games and stuff were a constant. Going from that to where I am now--a cabin in the middle of the woods--I find the silence stifling. It isn't like I want to talk for the sake of talking, but I want NOISE and you get it by interacting with people. So I find myself rambling on with my patients, or talking to people about things I don't even care about because I like the sound it makes that sound at all is happening. Later on I think, "Why did I talk about that? I don't like revealing so many details about myself so quickly, to a complete stranger nonetheless.." but that's what it is, at least in a bigger part.
So I can easily see how people would fall into this pitfall without having 100% self awareness about it. A bit of anxiety, a bit of immature teenager-mentality rut (invisible audience fallacies for example), and a big family (which can cause all sorts of angles other than the one I mentioned) and voila, a compulsive talker.
There are people who are self-absorbed and talk without regard for others at all. I think it becomes a big issue when that person is SUPPOSE to care about others they're talking to--but give no indications through their compulsive actions. If a mother is self absorbed, and just talks about herself and pays no REAL attention (i.e. maybe they heard and forgot right away indicating the brain thinks it is unimportant), I can see the strain it would cause on a child of hers trying to be noticed by her and just... wanting to be acknowledged that they exist in some way in that mother's mind. There are few questions asked at all.. and those questions are usually to lead back into something self absorbed all over there. It isn't conscious, at all, and there is no doubt on whether the mother loves their child or not.. but assuming love vs seeing it are two different things and they create far different results.