Those things happened to them as examples for us. They were written down to warn us who are living at the time when God's work is being completed.