Peak-End Rul
The peak-end rule is a cognitive bias (and a psychological heuristic) that causes people to measure the total emotional impact of an experience by the most intense (or peak) memory of an experience, whether it was good or bad, rather than an as average of the total experience. This may be part of the dynamic that causes couples to continually return to toxic relationships - the memories of the "good times" are more salient mentally than the sum total of experiences which was mainly unpleasant.