Hazrat Mufti Ebrahim Salejee (Daamat Barakaatuhu) mentioned:
The purpose of I’tikaaf is to create mental seclusion with the Beloved (i.e. Allah Ta‘ala). This is the beginning of spiritual progress. The hadeeth says that before nubuwwat, seclusion was made beloved to Rasulullah (sallallahu ‘alaihi wasallam). The mind has to be completely free from all other worries, concerns, desires and aspirations. Like a reserved parking, the mind doesn’t only need to be paak (pure), but also needs to be reserved solely for Allah Ta‘ala.