Let your heart therefore be wholly true to the LORD our God, walking in his statutes and keeping his commandments, as at this day.
1 Kings 8:61
A heart that is right with God will lead you to obedience of #torah. "Walking in the statutes and keeping his commandments" is the definition of "wholly true to YHVH".
...for they are your people, and your heritage, which you brought out of Egypt, from the midst of the iron furnace.
1 Kings 8:51
The purpose of the years of oppression in Egypt was the refinement of Israel, a furnace to separate the impurities from God's chosen implement to transform the world. Ultimately, this is the purpose of every hardship. Every phase of existence is training and preparation for a future mission. Nothing is wasted in God's plan.