When the people complained that they had no water Hashem instructed Moshe to go speak to the rock and water would flow. Hashem says: When that will happen, וְהִשְׁקִיתָ אֶת הָעֵדָה וְאֶת בְּעִירָם, “…and give drink to the assembly and to their animals.” (Num. 20,8) This implies that first the people should drink and then they should take care of the animals.
This is interesting because of a certain law whereby the Rabbis insist that one must follow. The Rabbis of the Talmud tell us that before someone sits down to eat he must first tend to the needs of his animals and feed them before he can eat. This is based on the Biblical passage which we recite in the Shema: וְנָתַתִּי עֵשֶׂב בְּשָׂדְךָ לִבְהֶמְתֶּךָ וְאָכַלְתָּ וְשָׂבָעְתָּ, “I shall provide grass in your field for your cattle and you will eat…”. (Deut. 11,15) Here the Torah mentions first the food for the animals and then food for man. Why is drinking different from eating food?
The answer may be that a person can go longer without food than without water. Hence, when he sits down to eat he should first fulfill his obligation to his animals and then take care of his own needs. When it comes to drink, he may first tend to his own needs.
This stresses how the Torah is concerned that we treat animals properly.