It is considered necessary to worship Ganesha before performing any auspicious work in Hinduism because he is called the lord of The Vighnaharta. By remembering them, meditating, chanting, worshipping, desires are fulfilled and obstacles are destroyed.
A similar story has been told in the Shiv Purana, according to which deity, Lord Shankar, once came to the problem of which deity should be chosen as his head. Lord Shiva proposed that whoever first revolved around the earth three times and returned to Kailash, would be worthy of worship first and would be made the lord of the gods. Since Ganesha's mount was a mouse with a very slow motion, because of his wisdom, he completed three rounds of his father Shiva and Mata Parvati and stood by his hands.
Shiva was pleased and said that no one else in the world is so clever than you. You have received the virtue of the three worlds orbiting the three worlds, which is more than the orbiting of the earth. Therefore, a man who worships you before the launch of a task will not be hindered. Just then, Ganesha has become a pioneer.