Why is Shri Ganesh worshipped before any puja or before commencing any auspicious task ?

Shri Ganesh – Remover of obstacles

Gana is a group of the eight Vasus (Deities of directions). Shri Ganesh is the nurturer and Master of the directions. (According to one school of thought, Shri Ganesh is the Master of the ten directions. The upward and downward directions along with the eight directions constitute the ten directions.)

Other Deities cannot reach the place of worship from any direction without His permission. Hence, any auspicious task or ritualistic worship of any other Deity is commenced with the ritualistic worship of Shri Ganesh. Once Shri Ganesh clears the directions of obstacles, the Deity being worshipped can manifest there. This is called Mahadwarpujan or Mahaganapatipujan.