When I make a bad decisions, I feel regret. But why do I feel regret? What benefit do I, or does anybody, get when they feel regret? What is the benefit of regret for those regretting?
Gilovich and Medvec's (1995) article in Psychological Review is a good place to start reading about psychological theories of regret.
They discuss economic approaches which interpret anticipated regret as influencing current actions. Thus, on a functional level, the desire to avoid regret could motivate us to make better decisions in the here and now.
More generally, many decisions do repeat in some form. Thus, the theory would be that we learn from our mistakes and by ruminating on our mistakes, we think about how we could do things differently in the future. Of course, this is a fairly adaptive response, and not all regret is this adaptive.
More generally, Gilovich and Medvec (1995) provide a good general summary of forces that reduce or increase the pain associated with regrettable actions both in relation to life long regrets and more short term regrets.