This quote is not entirely true: psychotic people talk to … voices in their heads, or their invisible friends, or the demons who pursue them, so having conversation with an empty room is not the exclusive domain of writers. But we do it too. However, we do it with purpose not out of madness. Well, not generally out of madness. A little madness spurs creativity.
The only way to tell if dialogue between characters sounds natural is to read it aloud – preferably using the voice you hear in your mind for that character. By acting out the conversation you can tell if it flows naturally — or if it comes off as stiff or cornball. This is one reason many fiction writers do their editing when the family has gone on an outing – or in a soundproof room, in a sub-basement.
On a related note, my dogs have become accustomed to me talking aloud when no one (no other person) is there. Cochise “humphs” at me (as in a forceful sigh) if I’m disturbing his slumber, but he knows I will go on regardless of his commentary. It’s different if I’m having conversation with the dogs (I do that too) because they’re involved in that. Being disturbed is okay then. Of course, if he’s helping me, then he’s awake anyway and enjoys offering his opinions.
Most of the time I’m proofreading. It is not possible to properly proofread an article by reading it silently, especially if you just wrote it. Maybe if someone else wrote it, but not your own work because you know too intimately what it is SUPPOSED to say and your eyes will tell you that what is on the page is what was in your brain. Small things will slip past you. Read it out loud and you catch those little goofs that will otherwise stand up and wave at you only after you click “Send” and fire it, irretrievably, off to the publisher.