Now all these things happened to them as examples, and they were written for our admonition, upon whom the ends of the ages have come.
The stories of the Exodus and the wandering in the wilderness were recorded by Moses as examples to help those who would live later. They are intended to help us avoid the same mistakes!
In 1 Corinthians 10:6-10, the apostle Paul warned against lust, idolatry, sexual immorality, tempting Christ and complaining. We can study these examples in passages such as Numbers 11:4-34; Exodus 32:1-6; Numbers 25:1-9; Exodus 17:2-7; Numbers 21:5-9; Exodus 16:2; and Numbers 14:36-37.