Rehoboam was given instruction in righteousness. But he chose to go a different direction. You can squander the things and opportunities God gives you. There is always consequences for our choices and when God's people choose to go against God we can expect chastisement, as any loving parent does.