anon answered on 23 Mar 2021:
Really interesting question that I am not sure I have the answer too!
But it may be explained in some in the context of mental illness, specifically schizophrenia and psychosis. Some of the symptoms of the disorder is talking to voices (hallucinations) which may present as talking to nobody and at random times.
Another symptom is also things like ‘word salad’ where they can talk in jumbled words an phrases which may seem very random!