Frisk was dying and the only thing they wanted to do is make it stop. They figured that going up the mountain of no return, that they wouldn't worry anyone. They hadn't known what would happen to them after they finally pass besides being free of their pain.