A story in the Puranas goes like this. Gajasura, a mighty demon, wants nothing but revenge on Gods. "They have killed my father Mahishasura. I will not rest until I make these very Gods my slaves," he vowed to himself.
He first obtained a boon from Brahma by offering a severe penance that spanned thousands of years. The boon guaranteed him an almost-eternal life – he asked Brahma that he be killed only by a Jitendriya, someone who had complete control over his sense organs.
Armed with this boon, Gajasura started harassing the Gods and sages to no end; he killed them, defiled their Yagnyas, and even kidnapped their wives and daughters. None of the Gods could kill him since no one qualified as a true Jitendriya, except Lord Shiva. But he was immersed in his meditation unaware of this calamity.
But Gajasura brought on his own peril when he started troubling the devotees of Shiva in Varanasi. “How dare he torment my devotees,” an angry Shiva got ready to face the demon in a battle.
Gajasura, while readying himself for his colossal fight with Shiva, had a fleeting thought. “Should I pray to Ganesha before I start the battle? They do say he wards off the obstacles in the path if we begin the day by praying to him.”
But then he shushed the thought and destroyed the clay idol of Ganesha that was quickly made for him. “I am a might Asura. I should be demented to even think that an elephant-headed God can help me.” But little did he know that Lord Shiva had sent Maya, the goddess of delusion, to cloud the demon’s thoughts and dissuade him from offering a prayer to Ganesha. Shiva feared that such a prayer would make the Asura invincible.
Gajasura, after a fierce battle, was eventually killed by Shiva who wore the demon's skin around him as a mark of victory. And, life returned to normal in all the worlds.
When you read this story, you can sweep it aside with a “It is just a superstition that praying to Ganesha will ward off the obstacles.” But think more about what the story is asking us to do. Rather than jump out of bed, throw on clothes, guzzle some food and start the work day in tearing hurry, you are being asked to bathe, wear fresh clothes, spend a few minutes in a calming place like the Pooja room, and think about your day. Then ask the God to give you the strength to handle peacefully all that is hurled at you during your day. Not so bad, right? All that starts well ends well, after all!