Board Thread:General Discussion/@comment-34285228-20170716200642/@comment-13682699-20170716225458

She cares to an extent in that you are a human; a seemingly innocent human child who does not deserve to die simply because they fell down into the Underground. She also does not want any further conflict between you and the monsters so she tries to teach you the value of MERCY since most monsters will likely try to obtain your SOUL. Being that going outside the Ruins will end in their death, she tries to keep them in her home to raise them, possibly until they die of old age.

When you try to leave, it is shown that she is VERY lonely and desires company amidst her self-imposed exile and also does not want this seemingly nice human child to die, so she goes to unusual lengths to make sure that you cannot leave including pleading, scare tactics, and eventually fighting you.

Also, Toriel was not following them the whole time, (at least not in the same way as Sans per se), however, after some time, she could not bear to lose yet another human child or even watch Asgore die from your inevitable duel to the death, so she left the Ruins some time after you left yourself. She only makes it in time for your final battle with Asgore when you take extra time to assist Alphys in confessing her feelings to Undyne.