Everything one eats and drinks comes to him as a blessing from Allah subhanahu wa ta’ala, but excepting the animals, no restriction has been imposed on cooking or eating anything from them other than that which would make it necessary for you to say, “Allahu-Akbar” or “Bismillah” invariably before cooking and eating, as if, that food would not be lawful without it.
At the most, the saying of ‘Bismillah’ at the time of eating and drinking anything has been classified as desirable or recommended [Mustahabb – acts, the neglect of which is not punished by Allah, but the performance of which is rewarded].
Contrary to this is the matter of animals for it has been made necessary [Wajib] that the name of Allah be invoked while slaughtering them, and if anyone were to leave the name of Allah the animal was declared to be carrion and unlawful.
What is the wisdom behind it?
The lives of all living beings are equal in a way. Therefore, the act of one life form whereby another life form is slaughtered and exterminated should, obviously, be not permissible. Now, for those it has been made permissible, it is a major reward from Allah. That is why the realization of the presence of this Divine blessing and the expression of gratitude for it has been made necessary at the time of slaughtering the animal.
This is contrary to the case of food items such as grains and fruits which are grown solely for the human beings to fill their needs. Therefore, the saying of ‘Bismillah’ on such items has been made desirable [Mustahabb] and not necessary [Wajib].
There is yet another reason. There was a custom from the days of Jahiliyyah that disbelievers used to pronounce the names of their idols while slaughtering animals. The Shariah of Islam transformed this un-Islamic custom into a wonderful act of worship by making it necessary to invoke the name of Allah instead. This was functionally the most appropriate strategy that some correct name instead of the false one be proposed, otherwise it would have been difficult to wean people away from ongoing customs.
[SOURCE: Maroof-ul-Qur’an by Mufti Muhammad Shafi Usmani]