Peak-End Rule
The peak-end rule is a cognitive bias that causes people to judge an experience by how they felt at the "peak" of the experience while discounting discomfort felt elsewhere during the experience.
For instance, a mountain climber goes on an expedition to summit a major mountain peak. After a successful completion of the trek, the peak-end rule suggests the climber will feel satisfaction and accomplishment from their experience judging it based on their most powerful memory - when they reached the top of the peak and looked around, relishing what they had just accomplished. They will be be less likely to judge the experience based on any pain, inconvenience, bad weather, or injuries that they experienced on the expedition.