Toriel is the former Queen of the monstersWe know there are "races" of monsters, because you can exhaust all the monsters in an area by killing them all. The silhouette of the king of the monsters is bipedal, has feet like Toriel, and horns, and is bigger than other monsters, just like her; so is probably another of her race. The monsters all attack you, even when they don't want to, and some plan is in the offing that needs the souls of human children. The only place where human children come from is through these ruins, and the one overseeing the ruins area is Toriel. Toriel has been acting deliberately to prevent the childrens-souls plan from happening, but the monsters don't do anything about it; in fact, they're intimidated by her, and she's a very powerful and skilled spellcaster. So the theory is: during the war, Toriel is wife of the king of the monsters. Bad things happen, and the monsters get kicked downstairs. The king hatches a plan to get out, involving the souls of human kids. Toriel opposes this, so volunteers to be the one to oversee the ruins and entice children in by pretending to be nice. The kicker is that she actually IS nice and has simply been failing to carry through on her own desires. And if perhaps the king and queen lost a child or two in the war, it would explain both why the king has gone for such a malevolent plan after presumed ages of peace (perhaps with influence by a certain vegetative person), and why Toriel is... Toriel.
If the player spares Toriel, he goes on a quest to make outside the ruins safer in hopes of coping Toriel to leave them, as well.
Toriel destroys the one-way door to the outside once the player character leaves. Alternatively, if Toriel is dead, the ruins collapse with no caretaker maintaining it.
There will be various caretakers in each part of the underworld.