As far as posting to forums is concerned, I will make a point of staying on-topic, and get very annoyed when the topic drifts.
But in normal face-to-face situations, I'm terrible at just coming out with random stuff. I used to wonder, too, why I did it, but having a think I realised it's that train of thought in your head that does it. Say you're lucky enough to be at a party and see an attractive NT lady, and you begin chatting to her. She asks you about where you work, the conversation peters out a bit (as it always does!), and your train of thought starts rolling....work >> getting paid >> what I'd do with some money >> must get some cash out to go shopping >> what shall I get at the supermaket >> Wouldn't mind some cheese. Your mouth opens and says "I could do with a nice bit of Danish blue right now". She looks at you a bit funny and decides you're a bit odd.
Also, it could be a pent-up need to share some bit of trivia which, to you, is extremely important or interesting, but to the NT is irrelevant. It's July, it's 9pm and it's 60 degrees outside, about 10 degrees lower than the average, and 5 degrees lower than last year's figure you found out on the internet earlier. This makes all sorts of connections in your brain, this was the temperature that night you had that date, etc. Someone comes along and rather than greeting them you say "It's 60 degrees outside, that's 10 degrees less...." etc. If you're lucky, the other person will just say "Right, I see" and wander off; if you're unlucky, you'll get "What the f*** are you on about, your weirdo?". for me, the danger signs are sentences beginning with "Did you know that..." or "I remember when...".
I've learned now that it's a question of keeping a lid on it. It's safer and less frustrating, and you don't beat yourself up after the fact wondering whether you talk too much.