Pointed out by @sparklypips – A fascinating video on the memory of events.
Daniel Kahneman gives an insightful TED talk on the science of happiness and the role “the experiencing self” and the “remembering self” plays in our perception of events.
The huge implication for designing the user experience is capture in the (rather grim) colonoscopy story which describes the experience of Patient A and Patient B.
Patient B experienced more pain throughout the procedure but when they were both asked to remember the event later Patient A remembered a worse experience. This was because the pain Patient A remembered at the end of the procedure dwarfed the relatively “good” experience they had throughout the rest of the procedure.
In terms of UX design, it shows a good user experience can be entirely undone if the exit point (or offline process) is inconsistent with a good online experience.