What you're describing sounds like what psychologists call palilalia (or echolalia if it's other people's words that you repeat). It's quite common in a variety of conditions, though the reason for it can differ between them. In autism, it can be a form of "stimming" (a repetitive sensory action which can calm us, communicate emotions that we can't put into words, or help us to feel more comfortable in our own bodies). In ADHD, it can be a result of differences in the way that impulse control is processed by the brain. It's also common in conditions which involve tics, such as Tourette's Syndrome and conditions where the brain has low levels of dopamine (for example, Parkinson's disease).
I do something similar myself, usually with a word that I've just heard or read which I particularly like the sound of, or sometimes just completely nonsense words that I make up myself (a bit like talking in tongues). In my case it's almost certainly stimming due to my autism - hopefully your forthcoming tests will be able to narrow it down for you.
_________________
When you are fighting an invisible monster, first throw a bucket of paint over it.