I do not pretend to understand everything the Bible teaches about God's purpose. But I do know that whatever God's purpose is, it will stand forever. It is unchangeable, unalterable, immutable. His counsel will stand. God rules the universe, absolutely, for the salvation of his people.
Nothing happens by chance.
Nothing is determined by man. Nothing is controlled by satan. The Lord our God is one whose purpose cannot be thwarted, whose will cannot be resisted, whose power cannot be defeated. He always does what he wills. We worship a God of purpose.