I have been worshipping idols of Lord Ganesha along with his carrier, the mouse, for many years. The rat or mouse is always kept close to one of his feet. As a child, when I read about it I was told that the vaahana (carrier) was called mooshika. Later I understood on my own that the word Mooshika is used both as a common noun, as well as a proper noun. As a common noun it belongs to the class of animals called rodents, and as proper noun, it is the name of that rat who is Ganesh's mount. Some say that the name of Ganesha's rat-vehicle is Anindya.
There are two stories in connection with how Ganesha got a mouse as his mount. According to one story, there was a demon (rakshasa) by the name of Mushikasura. He was defeated by Ganesha in a battle. The demon, in order to avoid punishment, offered to be Ganesh's vaahana (vehicle).
In another story, the mouse was a celestial musician by the name Krauncha (he is most known with this name). Once, accidentally, he stepped on the foot of the sage Vaamadeva who, in turn, cursed him to become a mouse. Krauncha assumed a huge form of a mouse and started damaging everything in its path. Lord Ganesha humbled him by catching him in his noose; but before he could punish the mouse, Krauncha begged for forgiveness. Consequently, the elephant god made him his vehicle for motion. Since the mouse could not take the weight of Ganesha, the latter reduced his size to accommodate Krauncha. By associating a rodent with Lord Ganesha who is projected as the Lord of obstacles, the creators have in one stroke achieved more than one thing. Think of the time when this image was created. It was about 1500 years ago or more, when our society was then totally agrarian and rodents were a very big menace. They would destroy crops in the field, grains during harvests and afterwards when the grains were stored. They would tear to bits clothes, mats, and nets with their sharp teeth. They would do all these in the darkness of night, quietly and stealthily when the whole world was asleep. There were no pesticides then to ward them off.
So, to assuage the desperation of everyone, this god was created and the imagery of a rat was used to convince the people that Ganesh would provide all the necessary protection against the destructive rodents. The farmers had no choice but to depend on this irrational belief.
The idol makers must have done a good business, as they do now, with the belief that the presence of the image of Ganesh would repel all obstacles and impediments. We know how effective these religious slogans are. Such beliefs have arisen in all societies from time immemorial and they are all born from man's helplessness. Such beliefs are always created by the administration, priests and the business people working in tandem. To make the fooling convincing, the word must have been spread by the vested interest groups that, like the rodents who can slither through tiny holes and narrow pathways, Ganesh would go into nooks and corners of the world to destroy obstacles and impediments of all kinds.
From many unknown sources !