Lord Ganpati is the chief deity of all the deities representing wisdom and intellect. He possesses the sole right to write scriptures. There is not a single place where his intellect does not shine. There is no weakness in his intellect. That is exactly why he is placed first and foremost amongst all deities. Even in rituals of prayer worship, Lord Ganpati is placed first.
By worshipping him, the intellect becomes humble and free from illusion. If a person encounters a few difficulties in a month but constantly lives in fear everyday, it is the result of deluded intellect. That is why Lord Ganpati is always placed first in any worship, so that the intellect does not become deluded and remains free from delusion. However because people perform their rituals without the correct understanding of Ganpati, their worship does not prove fruitful. If worship is done with the correct understanding, it will bring good results.
Ganpati has successfully passed through all the intricacies and perplexities of the intellect. By worshipping him with an understanding, the illusion of the intellect disappears and the right intellect will be attained.