Vegetarian for Brahmins was initiated by Saint Agasthya,
when he was invited to dine with demons like vadapi and Illvalan. Illvalan used to turn his brother vadapi into a ram, and killed it and made dish out of it and asked the invited guests to eat it. Not to displease the host, the guests ate it and after eaten it , Illvalan by the virtue of boon got by him, called out the brother vadapi to come out of the stomach of the guests. Vadapi will come out tearing the stomach of the guests in full form. In this manner, many brahmins and rishis were killed by these demons. The demons then devor the guests. In the similar manner, when sage Agasthya happen to pass through their place, these demons invited him to have dinner with him. Because of supernatural powers agasthya had, he came to know the ill intentions of these demons and without second thought he agreed to take part in the dinner. As usual, vadapi was turned into goat and got cooked by his brother and served to Sage Agasthya. Agasthya ate the goat and after that uttered "Vadapi jeeranoth bava". When Illvalan tried to call his barother vadapi, vadapi did not appear and Illvalan was shocked and surprised. Knowing that his brother was killed was sage agasthya, he got furious and tried to attack and kill sage agasthya. Agasthya again by his power , reduced Illvalan to ashes and thus got rid of both the demons.. Now sage Agasthya came to a conclusion. He instructed that "From now on, No spritual oriented persons (including brahmins) and sages, rishis should consume meat and meat oriented products in what ever manner . So it's Agasthya who is responsible for the vegetarianism of the brahmins and rishis...
This story from our scripture is a simile and should be understood properly. A literal translation or on the face of it seems a justification for eating meat.
But the true meaning is much deeper.
Esoteric Meaning:
From a brief overview of the story it looks like it was the norm for Brahmins to eat mutton but if we examine the story we can easily see the actual meaning.
Sage Agastya is shown to create his wife from all good things. This indicates the birth of “faith” in him to get the absolute knowledge. As a Sage, he is married to faith. Lopamudra is Lady Faith. She sends him on an errand to gain the best wealth which is true knowledge. There are four Purusharthas in this world which are a form of wealth. The four Purusharthas are Dharma, Artha, Kama and Moksha.
The Sage meets with the three Kings who have the wealth of the first three Purusharthas respectively. The efforts they had to put in according to the shastras to obtain the Purusharthas is the income and their enjoyment of the Purusharthas is the expense. The income and the expense balance out. Upon examining their income vs expense statements the Sage realizes that the first three Purusharthas are not eternal wealth. He therefore takes the three kings with him to obtain the eternal wealth from the Dhanava Ilvala. The five stars in Orion’s head are called as Ilvala. The moon called as soma is the regent of these five stars. Thus we have a hidden meaning about the Soma Sacrifice in this legend.
The sacrificial oblation is often represented as a victim in the form of a goat. The moon Soma cooks his brother Vatapi as a goat. That is the moon sacrifices something which is very dear to him. Thus Vatapi is the Soma juice obtained from the moon Soma. Vatapi has the essence of the Soma Juice and is the “food of true knowledge”.
The stomach is used to represent a samsaric man’s sufferings from hunger and thirst. A Brahmin is a person who seeks Brahma Vidhya. Ilvala feeds knowledge in the form of Vatapi to the Brahmins. As soon as the Brahmins consume this supreme food, Vatapi is shown to burst forth from their bellies to show us that true knowledge ends the troubles of samsara.
When Ilvala offers knowledge Vatapi as food, Agastya consumes everything without leaving a single morsel for the kings. This is to show that only Brahmins have the right to consume the Soma Juice. Even though Agastya eats Vatapi without leaving a single morsel for the kings, they too are benefited when Sage Agastya obtained true knowledge. It was shown earlier that Vatapi burst out of the stomach of Brahmins in order to show that true knowledge ends sufferings. It is also equally essential to show that true knowledge makes a person immortal. Thus Sage Agastya is shown to have digested “Vatapi” and he is not harmed. Ilvala granted wealth to the Sage as well as the three kings to show that people of other varnas (castes) are benefited as well when a Brahmin acquires true knowledge.
The Sage then returned home and his wife Lopamudra conceived. The embryo grew in her womb for seven years and after the completion of the seventh year was born as Idhmavaha. It should be noted that it took seven whole years for the embryo to develop. This part of the legend shows us that the Sage obtained the Supreme-Self as his son i.e to show the Sage’s spiritual birth. A person who is initiated into spiritual path through the Upanayanam ceremony is called a Dwija. The Upanayanam ceremony is typically performed after the completion of the seventh year. Thus Idhmavaha is shown to grow in Lopamudra’s womb for seven years and then take birth after the completion of seven years to indicate the Sage’s spiritual birth.
Through Ilvala’s sacrifice of Vatapi Idhmavaha is born; thus, Ilvala’s wish to have a son equal to Indra is fulfilled as well. The word “Indra” means king and refers solely to Lord Vishnu. Only when we add a prefix to the word “Indra” the word is used to refer to other kings like Devendra, Gajendra etc. Idhmavaha is thus the Supreme-Self and He is realized by sage Agastya. The name Idhmavaha means the one who carries the fuel. The Supreme-Self carries the fuel "jeevatma"; i.e Paramatma is the means as well as the end. This is the true knowledge required to attain moksha. This is the true meaning of the story.
Reference:
Essays on Indo Aryan Mythology by Narayan Aiyangar.