Based on this understanding...
Based on this understanding, the purpose of the Almighty in legislating Itikaf is to lead His servants toward piety, the provision for meeting Him. This overarching purpose applies to all acts of worship, including those that accompany Itikaf, such as fasting, prayer, staying in the mosque, and remembrance of God: “O you who believe! Fasting is prescribed for you as it was prescribed for those before you, that you may attain piety” .
[14] The Almighty describes the believers as the people of salvation and mentions humility in prayer and constancy in it as the causes of prosperity: “Indeed, the believers have succeeded, those who are humble in their prayers … and those who guard their prayers. They are the inheritors who will inherit al-Firdaws (the highest Paradise),…