According to Bhavishya Purāna, Shatāneeka, grandson of Parikshit learns about Dharma and Karma-Kānda (rituals) from Sumantu Muni. Below is a conversation between them about Lord Ganesh, the creator of obstacles.
King Shatāneeka asked, “Muni, for whom did Lord Ganesh create obstacles, because of which he was called Vighna-Vināyaka (creator of obstacles). Bear with me to tell me about Vighnesha and the reasons for which he creates obstacles.”
Sumantu Muni said, “King, according to his Lakshana-Shāstra (character-literature), Swāmikārtikeya once composed the characters of men and women. Lord Ganesh created obstacles at the time. As a result, Kārtikeya became furious and pulled one of Lord Ganesh’s teeth out and became prone to kill him. At the time, Lord Shankara stopped him and asked about the reason for his anger.”
Kārtikeya said, “Father, after composing the characters for men, I was composing the characters for women. He created an obstacle in it, and I could not complete the characters of women. This has enraged me.”
Listening to this, Lord Shankara calmed him down. He asked him, “Son if you know the characters of men, tell me what characters I have?”
Kārtikeya said, “Lord, you have such a character that you will be known in the world by the name Kapālee (beggar).”
Listening to his son talking like this, Lord Shankara became angry and threw the Lakshana-Grantha (character-book) into the sea and disappeared. Later he called Samudra (sea) and asked him to compose the ornamental nature of eccentric characters for women; And preach the characters for men that Kartikeya has said.
Samudra (sea) said, “The literature of the characters of men that I will preach must be known by name as ‘Sāmudrik Shāstra’. Lord, your order will surely be fulfilled.”
Shankarji said, “Kārtikeya, you must return the tooth that you have pulled from Ganesha. Surely, whatever has happened was meant to happen. By God’s will, it was not possible without Ganesha. That is the reason, he created an obstacle. If you want the literature, you can take it from Samudra (sea). But it will be famous by the name of ‘Sāmudra Shastra’. Return the tooth to Ganesha.”
Kārtikeya said, “I will give the tooth to Vināyaka as you said. But he will always have to keep the tooth on his person. If he throws the tooth away and goes far from it, this tooth will evanesce him.”
Then he placed the tooth in Lord Ganesh’s hand. Lord Shankara convinced Lord Ganesh to agree to this term of Kārtikeya.
Sumantu Muni said, “King, even today the idols of the son of Lord Shankara, Vighna-Karta Vinayak (creator of obstacles) can be seen with a tooth in his hands. I have told you this secretive thing about God. It was not known even to Gods. Knowledge of this secret on earth is rare. Happy with you, I told you this story. But it is necessary that this story is told and retold only on the fourth date of a month. A wise person should tell this story to the superior Veda knowing Dvija (born from two), true Kshatriya, Vaishya and featured Shudra. A person, who abides by this Chaturthi-Vrata (fourth date Vrata), nothing in this or the para-world remains unattainable for them. They do not see a demise, and nor do they see defeat. Bhārata-Shreshtha (superior to India), without any obstacles, they finish all their works. There is no doubt about it. They also attain Riddhi-Siddhi-Aishwarya (prosperity-substantiation-success).
King Shatāneeka asked, “Wise one, who made Lord Ganesh the king of Gana (pupil)? And while having an elder brother, how did he become the commissary of Vighna (obstacles)?”
Sumantu Muni said, “King, you have asked a good question. I will tell you the reason why he became Vighna-Kāraka (creator of obstacles); The obstacles he created to be on this chair. Listen carefully now. In the first Krita-Yuga (beginning) when the pupils were created, all works were completed without any obstacles. So, the pupils became proud. Looking at them, without problems and full of pride, Lord Brahma chose Vināyaka for their prosperity. So, by efforts of Lord Brahma, Lord Shankara created Lord Ganesh and made him the master of Gana (pupil).
Now, listen to the characters of the person who starts work without worshiping Lord Ganesh first. The person dreams about themselves drowning or bathing in very deep waters. They see themselves with shaved heads. They see themselves cloaked in saffron clothes or riding a carnivorous animal like a tiger or a lion. Surrounded by their family, they see themselves leaving on an Antyaja (a caste), donkey or a camel. A person who sees themselves riding a crab, going into currents of water, or surrounded by pedestrians, leaving for Yama-Loka (death) surely faces depression.
A prince who sees himself ugly and deformed does not inherit the state from his predecessors because of obstacles. An unmarried woman does not find a good mate. A pregnant woman does not successfully deliver a child. A Brāhmana does not benefit from teaching and a student does not study. A Vaishya does not make a profit in business and a farmer does not profit in agriculture. This is why o king, after having such bad dreams, to please Lord Ganapati, one must perform Vināyaka-Shānti (a ritual).