“…for You and for Them to Eat.”
When G‑d gave Noach instructions concerning the Ark that was to save him, his family and all living creatures, He stated the following:
“As for you, take for yourself from every edible food and bring it in with you. It will be for you and for them to eat.”
A question has been raised why G‑d’s instruction mentioned the food for the people first and then for the animals. Doesn’t this contradict the Torah’s instruction for us to feed our animals before feeding ourselves? This is derived from the words in the second section of the Shema:
“I will provide grass in your field for your livestock, and you will eat and be satisfied.”
The Torah mentions the grass for the animals first before mentioning the food for humans. The Talmud (Gittin 62a) derives from this:
“It is forbidden for a person to eat before he feeds his animal.”
Why then does the Torah reverse the order here?
“Put Your Mask on First”
A simple, practical answer is that there were only eight humans and a myriad of other creatures. If they would have to wait to feed all the creatures they would hardly get an opportunity to eat themselves. In a starving state they would hardly be able to be of assistance to the animals.
This is similar to the instruction given on planes that in case of an emergency we should place the oxygen mask on ourselves before assisting the children.
Exception to the Rule
Another answer given is that this rule that gives precedence to feeding our animals is only valid when it is not a matter of life and death.  When G‑d instructed Noach to bring food into the Ark it was a matter of survival. In that situation human lives definitely take precedence over the welfare of animals.
One can still raise the question why was it necessary for the Torah to even mention that Noach was to bring food into the ark for both human and animal consumption? Obviously, if they were to remain ensconced in the Ark for a year, they would need food.
Humans and Animals were Not Created Equal
Perhaps the Torah wanted to make it clear to Noach and future generations that there was a qualitative difference between humans and animals.
Before the flood, humans were not permitted to eat meat. Adam had been commanded by G‑d to consume only vegetation and that he would share that vegetation with the animals. This could leave the impression that G‑d wanted humanity to consider itself equal with animals.
The Sin of Cain
According to the famous Jewish Philosopher, Rabbi Yosef Albo, the sin of Cain was motivated by his belief that humans and animals were qualitatively equal in importance. Cain’s error came after G‑d rejected his offering, which consisted of vegetation while He accepted Abel’s offering from an animal. Rabbi Albo explained that Cain did not offer an animal sacrifice because he regarded people and animals as equals. He therefore felt that he had no right to take a life of animal even for the purpose of serving G‑d just as it would be wrong to take the life of a human being.
When G‑d accepted Abel’s offering and rejected Cains, he should have recognized that as a sign that his philosophy was fundamentally flawed; animals are not equal to humans. Instead of reaching this conclusion, he reasoned that, on the contrary, if it is acceptable to take the life of an animal so too would it be morally correct to take the life of a human.
It is fascinating that according to our Sages, cited by Rashi, Cain was ultimately killed by his descendent Lemech, when he mistook him for an animal he was hunting. His own demise came by confusing human life with animal life, the underlying motivation for his murdering his brother Abel.
This lesson derived from the above is that when we attempt to equalize animals and humans it usually results in the devaluation of human life and not the promotion and advancement of animal welfare.
To be sure, the Torah in so many ways commands us to treat animals humanely. Indeed, the law that requires of us to feed our animal before eating ourselves is evidence of this principle. However, these laws do not support the idea that animals are equal with people.
Since this prohibition of consuming animals was still in effect, G‑d wanted Noach and his progeny to know that, fundamentally, humans take precedence over animals.
Once the principle of human superiority was firmly established and seared into the consciousness of humanity, there is no longer the fear that we may trivialize human life. It was then “safe” for the Torah to exhort us to feed our animals first. This command would not lead to the devaluation of human life.
Why do Humans Have to Eat Lower Life-forms?
On a deeper level we can explain why the Torah gives precedence for the food for humans in the Ark, while we were later commanded to feed our animals first.
The great Kabbalist, the Arizal, raises the question concerning the fact that humans, the putative “crown” of creation, are dependent on lower forms of life for their subsistence. Why would G‑d create a system in which the higher forms of life must depend on a lower form? It would have made more sense if humans would we nurtured by a higher spiritual source of nutrition.
The answer given by the Arizal is that the sustenance we receive form the animal (or plant) is not from the animal itself but by the Divine spark embedded in every physical being.
This, the Ba’al Shem Tov added is deeper reason for hunger. The body’s appetite is a result of the soul’s appetite to consume the Divine spark in the food.
The Alter Rebbe raises the question. Why do we need to be sustained by the Divine spark in the animal or plant? Don’t we humans also contain a spark of the Divine?
Source of Animal from World of Tohu
The Alter Rebbe answers that the source of the animal is form the higher world of Tohu-Chaos which transcends the ordered world of Tikkun-Perfection or order, which is the source of human souls.
While the world of Tikkun has the advantage that its spirituality is attenuated so that it can be accessed properly, the world of Tohu is known for its powerful energy. So powerful is it that it shattered the vessels, much like a surge of energy that shorts the circuits and burns the wires. Shards of these shattered vessels with remnants of the powerful energy of Tohu embedded in them descended into objects and food of the physical world.
We can now understand the spiritual dynamic of food consumption. When we eat the food that contains these exalted sparks from the sublime world of Tohu our own spirituality is enhanced.
By extension, Chassidic thought explains, that what is true of animals is also true of our own Animal Soul. This provides a spiritual explanation why the feeding of animals takes precedence over the feeding of humans. It underscores the superior source of our Animal Soul. So that when we refine our Animal Soul and transform it into an agent of love for G‑d it energizes the G‑dly soul.   
This is what our Sages had in mind when they translated the words of the Shema, “And you shall love G‑d with all your heart,” as a reference to the two parts of our heart, our good impulse (which derives from our G‑dly soul) and our evil impulse (which derives from our Animal soul).
It is not enough to engage our G‑dly soul in the quest to get closer to G‑d; we must also harness the Animal Soul, which adds much more power to the love for G‑d.
We can now understand why the Torah wants us to feed the animals first because the animal, both external and internal, possesses a hidden spark, which when harnessed properly energizes and enhances our own spirituality.
By feeding our animals first we recognize that our mission in this world is first and foremost to deal with the challenges that stem from our Animal Soul because it is the animal that will nurture and elevate our G‑dly soul.
Pre and Post Redemption
However, this is true only for life prior to the Final Redemption. The purpose of the pre-Messianic period – from the creation of Adam until the Redemption – is to refine the physical world in general and the Animal Soul in particular, and in doing so we enrich the G‑dly soul, enabling it to reach higher levels. As mentioned above, this occurs because, the spiritual source of the internal and external animal is higher than the source of the G‑dly soul.
However, the ultimate source of the G‑dly soul, its essence, is actually beyond the powerful world of Tohu. Indeed, it stems from G‑d’s very essence! When this essential state of the soul will be fully actualized in the Messianic Age, we will no longer have to give precedence to the animals.
We can now understand why the order of feeding was reversed for Noah’s Ark. Our Sages tell us that the Ark the animals did not harm one another. They experienced a sample of the future Messianic Age, of which it is said that the “wolf will lie with the lamb.” In this unique “Messianic-esq” atmosphere there was no need to advance the feeding of the animal before that of humans, for at that time they experienced a more advanced state of humanity.