Ah, excellent question, reader!
Both pokémon have separate brains in each of their heads. In fact, studies have shown that each head can possess vastly different personalities. One would assume this would mean doduo and dodrio are in constant conflict with themselves, but in actuality, each of these heads are linked telepathically. Scientists aren’t entirely sure why doduo and dodrio possess this ability when they are not otherwise psychic, but the ability is essential for resolving conflicts almost immediately, before it becomes a physical problem.