We can remember the past to help us modify present behavior to control results in the future. This is obviously a successful survival tool, very well developed in human brains. But it can also be used wrongly.
If I ate something that made me sick, I should have enough sense not to eat the same thing again. And so on for many events which occur repetitively throughout our lives. Useful and no problem except that sometimes our memories and evaluations may be incorrect.
But another type of memory is more destructive if used too much. I will label this the “Helen of Troy” memory, well documented in classic Greek drama. “Gee,” says Priam gazing at the ruins of Troy, “if I had never abducted Helen none of this would have happened.” In American terms, of course, it is the coulda woulda shoulda syndrome. All this does is fuel an often destructive narrative as a victim of circumstance about failures in the present. And it is relatively useless in any objective way, although it might help our mental state.
The past is gone. I may be offered the same food again. But Priam will never again be a rich young prince tempted to abduct a beautiful young bride from a vengeful old husband.
You may claim “”well at least we can learn from his error” which is of course the purpose of literature. But from our own memories, rarely if ever is this very useful.