It's about optimism. You don't have to regret everything happened in the past. If you did something bad, then call it experience and avoid it to happen again and if you did something good then it's great.
Actually it's hard to explain something that's really understandable. Sorry.
I hope my explanation helped.
I would call that type of quote a homily.
Apart from that it is not simply about doing "something bad" but how one handles, what was for him/her, a really bad experience.
There are different methods, depending on the individual concerned, that can be used.
One such method is to "call it experience" and simply move on.
I don't think it is the best method.