1 Corinthians 10.6 explains history so that we will not crave evil things as they did.
What has been recorded in the Scriptures, particularly with Israel under the first covenant, has been preserved so that we might learn from the consequences of their sin and instead live to please God.
Paul reminds us that Israel craved evil things which resulted in their judgment and loss. Specifically four particular evils are mentioned in this chapter.
First, they were idolaters. Instead of loving God first and most as demonstrated by obedience to His commands, they loved themselves and pleasure leading them to immoral behavior.
Second, they were immoral, particularly sexually immoral, which is the natural result of loving ourselves, our flesh, above God. The result was that God eliminated many from Israel.
Third, they were faithless constantly putting God to the test. Israel forgot the past works of God and were always demanding new works from God to meet their perceived needs. They thought God was their servant instead of seeing themselves as the servants of God.
This led to the fourth evil which was complaining about God and His lack of care for them. Complaining and grumbling is disrespectful, faithless and selfish. We dislike the behavior in our children and our Father dislikes it from His people which resulted in Israel experiencing real suffering.
We have been created by God for God to serve God therefore we seek God and the obedience of His will in the world.
Keeping God and His glory first in our devotion and actions will result in peace and joy in our lives.