Romans 15:4, For whatsoever things were written aforetime were written for our learning, that we through patience and comfort of the scriptures might have hope.
All the mistakes that are recorded in the bible are written there for us to learn from them. History repeats itself because people don’t learn from history. If people listen to history it will not bother to repeat itself because you will find out that there is nothing anybody is doing that someone has not done before. If you know that your father had sixteen wives and he died a broken and unhappy man, it is a lesson for you not to follow the same path. There are a lot of problems associated with polygamy and if you have ever experienced one, learn from it.