The solution to inheritance for families without sons isn't as simple as they thought. Numbers 36 relays the compromise made to ensure both the families and the tribes retain their land.
God arranges cities to accommodate the Levites, who have no inheritance. We also learn about cities of refuge and discover an interesting link between poverty/destitution and violence.
God didn't choose the Israelites because they were perfect, He chose them because Abraham (who also wasn't perfect) had faith. Similarly, we are chosen because of Jesus; as long as we maintain our faith and relationship with Him, we will find our way back to God.
We see these events from the point of view of Balak, king of Moab, and Balaam. Balaam is summoned to the king in the hopes of placing a curse on the Israelites.