How to learn from experience? Often we keep doing same thing but don’t learn.
If you keep doing the same thing again and again knowing that it brings you misery, you really don’t understand that it brings you misery, or you think it brings you some pleasure. Craving for pleasure and non awareness that it is going to cause you misery are two things which makes you commit same mistake again and again. That’s why it is called habit. Habits don’t give you pleasure but they inflict pain by not following them.