i hc that the picture we find in sans' basement is of him on the surface with his human friends that he went to uni with BUT there were an increasing number of monster-exclusionist laws that were passing. He was worried for Papyrus because Papyrus was still in middle school but he thought 'alright, let me finish off my degree then we can go a monster-safe zone'. It sucks but he thinks 'As long as it's not hurting me, my bro or my friends, i can get through this'.
Two weeks before his finals, the equality act gets amended to very cleverly (and non-subtly) exclude all 'disproportianately arcaneous individuals' (i.e. monsters). Some schools/unis still let monsters in. Sans' uni doesn't. He keepstrying to appeal his way in, but either gets ignored or very quickly shut down (his prof was very openly speciest as well). He falls into a slum, because this degree was all he needed to secure a decent life for them, and these friends were the only people keeping him going.
His friends don't agree with what's happened, but they're too busy studying for finals. They joke around like 'hey! You can have my degree on weekends!' They're also upset for him because out of all them they all agreed Sans would be the one to pass with flying colours. They promised him they'd come visit him as soon as they were done.
So when the day of the final comes, he sits in his room on the Monday, letting Papyrus sleep in because his school just recently complied with the law as well (he disabled his alarm). And as soon as the clock hits 11 (the time of the exam), he throws away all his papers, chucks his course project into the basement, throws a cloth over it and locks the door. They didn't even let him finish his degree.
And to top it all off, as soon as the finals period is over, his friends can't even come visit him. The town he's in was put under seige and became a warzone. Maybe they tried to visit him but were told to turn back around, maybe they tried to get through anyway and got shot. If they knew what was good for them, they wouldn't have even bothered. Somehow, that idea was the one that hurt the most. Papyrus was still hurt that he wasn't not going school. Sans told him his school started their half-term break early. Papyrus still tried to study after that. Sans has given up.
Then, Asgore calls for all monsters to evacuate to the mountain. People start running there in hordes everyday, the monster community in his area lessening day by day by day. After all, you'd have to be a lunatic to stay. Even their stubborn neighbour who refused to give up his home for any 'darn humans' was gone. Maybe he was killed too. Sans stayed put. Maybe he just didn't have the energy to leave, but he also didn't want to. This was his home. They promised, his friends promised.
Then, against Sans' best efforts to keep him in, Papyrus somehow ended up outside and Sans found him terribly injured. Concussed, even. At that point he had no choice. Gaster hadn't come home in days (presumably dead/aboned them) and it's past the point of making excuses. He grabbed Papyrus and all their valuables into one place, teleported them and all their stuff to one of the valuables carriers and then took Papyrus and ran.
But as he ran past the border, he paused. He waited. They promised him after all, they promised. He stayed put, trying to spot them, every part of his intuition telling him there was no way they'd be here, that they'd probably be dead if they tried. Did he want that? Did he wants his friends to be dead? But he was so desperate. They were the people who pulled him out of his depression, who made studying under such a shit professor so fun, his only sense of normalcy.
There was a scream from somewhere extremely close to them, and bullets started firing. He turned around and didn't look back, taking them both to the mountain without stopping. He thought about them sometimes, in the underground. For a while, he wanted to believe the war would be over soon, that maybe, by some miracle they could reunite, even if he knew better. He didn't even need to finish his degree he just wanted to see them again.
Then the barrier was made. Then Papyrus woke up, unable to remember most of what happened in his life before. Then the underground began a mass rebuilding of society, where anyone who had studied stem was being rounded up by the newly claimed king to work on the core. Then he saw gaster, and met alphys and the rest of the monster crew. They laughed about their situation together whislt working. Papyrus got taught by whatever professors (or close enough) the underground had, with help getting in from one of the core crew. Weeks turned into months, which turned into years, which turned into decades, and then a few decades too many. He knew, even if he went back now, no one would be there to greet him. Papyrus had finished school now and after lots of exposure to the royal guard (they did live in the central city after all) now wanted to become a guard himself. Sans couldn't fathom the idea of Papyrus willingly putting himself in danger, especially after all he'd seen.
With that, alongside a bunch of other factors like falling back into depression and the core being done (so he basically lost his one purpose) and just generally not wanting to put in more effort than he already had, he got his brother, packed things up and travelled to who knows where, as long as it was far away.
Before he left, as a thank you for his contributions, Asgore made him the royal judge. Sans said he didnt want anymore responsibility, but Asgore assured him he wouldnt have to do anything save for when the occassional human fell down. He took his offer (he did provide him and his bro with free housing, food and protection after all, and a stable job) and left to go somewhere far away, and that's how they end up in Snowdin, with Papyrus being told by Undyne (her and Sans talked) that he was there on watch duty. They ended up picking a house really fast because 1) it was the only one available and 2) when Sans scoped out the inside, he found his old papers and the machine, still covered in its cloth already there (probably placed in advance as an extra gift from the core crew). He got nostalgic and shifted through them, reminiscing, and ended up finding a note which he immediately recognised as being written in his late friend's handwriting, the alcohol stains and pen smudges from one of their "fuck it all" parties still present, with the words 'don't forget' written on it in what was probably a drunken haze. He placed it on the top of the pile, closed the drawer and went.to his room, leaving it all behind.
This is why he talks about 'giving up, like i did' and 'is it really worth it?' in pacifist runs. He still hasn't fully moved on. And his talk about 'timelines' in geno is him reverting back to his science side, fully going back into his old self because at that point his old research is all he has left. It's also why he hates making promises and shows signs of being in a slump/depression in his interactions, as well as his supposed connection to the surface. He doesnt want to go back because there's nothing to go back to (his old friends)
*This is canon to Teen Frisk AU (but is still my hc in general) please PLEASE do send asks about it (or teen frisk au in general) if u want :DD
@ken-tfc (i dont have any other ut moots sorry <//3 i just need at least ONE person to see this)