What does intention add to staying in a mosque?

Bab al-Iʿtikaf: Rules, Restrictions, Invalidation and Vows