Deuteronomy 4:4 (ESV)

4 But you who held fast to the LORD your God are all alive today.

The ones who survived the judgment at Baal-peor were those who kept close to the Lord, and this is what Moses looked to promote in his speech to the Israelites.