During the 7-8th centuries, even in the ages of the poets: Homer and Hesiod, a mythical figure was created to barricade and guard the gates/openings to the underworld, forcing the shadows to remain and restricting the humans from entering.
Before the Cerberus; a broad, intimidating dog, whose heads vary from three to one hundred, a half-woman and half-serpent, Echidna, married Typhon; a fire-breathing giant engulfed with dragons and serpents. The marriage enforced terror upon the other figures because of the power both creatures held, however, the birth of Cerberus confused and frightened the others excessively. Following the birth, Echidna develops Cerberus at Tainaron; the same place where Euripides had Hercules enter the underworld. Unfortunately, as Cerberus grew, Echidna encouraged Hera to embrace him, meaning as a “thank you gift” for protecting Echidna, Hera was allowed to adopt the dog. This act forced Zeus; the god of the sky, to defend himself against Typhon’s selfish desire to rule and empower the cosmos; a place of darkness and home of the universe(s). While both men fought, Hera politely declined the dog because of its “disgusting characteristic qualities,” leaving Hades; the god of the underworld, to manage the dog himself; hence why Cerberus would be seen guarding the gates.
Briefly, Cerberus was designed as a myth, a guard for the underworld, and an unfortunate dog whose future was brushed and altered because of the mother’s naive behavior.