hey. can people please stop parroting "stan only regained his memory because it's a disney show" like it's an objective fact and somehow a storytelling flaw? because that's reductionist and straight up untrue. stan regaining his memory is not a random deus ex machina, it's clearly established earlier in the season that the memory gun isn't permanent via mcgucket's storyline. as soon as mcgucket watches the tapes in society of the blind eye, he begins to gradually heal and regain his memories. it makes perfect sense that mabel's scrapbook (and in journal three, stan and ford's old home movies) would function the same way for stan.
realistically, stan probably wouldn't have remembered his entire life in the span of a week, but his recovery is obviously being condensed for the sake of pacing. there's a ton of awesome fanworks based on the idea that he's still recovering new memories long after the end of the show, particularly from the darkest period of his life when he was homeless and estranged from his family. but that's not relevant to the finale. what matters for the show's purposes is that stan remembers the events of the past summer, so that his goodbye with dipper and mabel at the end of the episode holds dramatic weight. because THAT'S HOW YOU WRITE A STORY.