Lord Ganesha is one who clears your way of all obstacles. His other name is Vighnaharta, i.e. the one who takes away all impediments, obstacles, sorrows. So, he is worshipped to ensure the success of any new venture. The intention here, is to pre-emptively remove any difficulties which might come in the path of success. Such is Ganesha's reputation of ensuring a smooth flow of all operations, that he is the first one to be worshipped during yajnas.