It always baffles me when people use Time Traveler’s Pig as an example of Mabel’s “selfishness” because to me the whole thing is about Dipper being selfish to the point that it becomes really creepy and uncomfortable.
He doesn’t want to keep repeating time because he feels guilty that he hurt Wendy. If he had, that would have been a much more understandable motivation. His problem isn’t that he hurt her; it’s that she agreed to date Robbie. And we all know that Robbie is kind of a jerk, but also at this point Wendy genuinely likes him. Dipper is trying to undo something that his friend is happy about because he thinks that if she doesn’t date someone else he might have a chance with her. That’s really creepy! I don’t think we acknowledge that enough!
And the ending sequence is absolutely about Dipper realizing how important Mabel’s happiness is to him, but it’s also about him realizing that he can’t predict what makes people happy! He thinks that Waddles is one of Mabel’s flash-in-the-pan interests, and he’s wrong! For all his math and planning and attempts to control things, he’s going to be wrong about people, and they won’t behave in ways that he wants or expects, and he needs to acknowledge that! He assumes that because Wendy agreeing to date Robbie made him upset, it’s an objectively bad thing that needs to be fixed, and it isn’t! Wendy can make her own choices, and there are things about Robbie that she likes even if Dipper can’t understand it.
The episode takes Dipper’s tendency to deal with the uncertainty of life through obsessive planning and list-making and takes it to its logical extreme, showing that even if he gets a near-infinite number of tries to put his plan into action, he can’t create a perfect day if he doesn’t takes the wants and needs of other people into account.