The sage who gave back the wish-jewel
A jewel in a forest hermitage
The sage Kapila keeps a hermitage in the forest. He owns the chintamani, a jewel that grants whatever its holder wishes for, and he uses it to be a generous host.
Gana, a prince, arrives at the hermitage with his retinue. Kapila feeds the whole company, and the prince sees how it is done: the jewel supplies everything. Gana asks for it. Kapila refuses. Gana takes it by force and leaves.
The sage turns to Ganesha
Kapila has no army of his own, and he does not try to recover the jewel by force. He worships Ganesha and asks for help.
Ganesha answers him. He goes after Gana, defeats him in battle, and recovers the chintamani.
The jewel is refused a second time
Ganesha brings the jewel back to Kapila. The sage, who has just lost it and fought to have it returned, now declines it. What he asks for instead is that Ganesha himself remain at the place.
Ganesha agrees. He stays, and he is worshipped there under the name of the thing he recovered: Chintamani. The story places this under a kadamba tree, and the tradition remembers the settlement by an older name taken from that tree.
What the story explains
The episode supplies the deity's name and the reason the shrine is where it is. It also turns the name around. Chinta means worry, and the jewel's name is read as "the one who removes worry"; the Maharashtra Tourism department describes the Theur Chintamani in exactly those terms, as the stop on the Ashtavinayak yatra that stands for peace and freedom from worries.
The sage's choice is the point the story turns on. A jewel that grants every wish is the thing a greedy prince steals. The sage who owned it ends up preferring the giver to the gift, and the temple is the result of that preference.
This story is widely attributed to the Ganapatya Puranas, but we have not yet been able to check it against a translation of the Mudgala Purana or the Ganesha Purana, so the names and the order of events may differ there.
Where this account comes from
We have not yet found a text we can cite for this account. It is told here as it is told locally, and marked unverified.