Food isn't the sole use for livestock, these is leather and wool which would be useful in the creation of clothing and furniture, adhesives from connective tissue, fertiliser from dung, offal and bone, bone can be used as a replacement for wood in the crafting of many items. While on Earth we have synthetic replacements for many of these items, the process is arguably to energy and resource intensive to be viable on Mars. Besides which I am not sure the requisite chemicals could be easily synthesised on Mars.
In light of the terraforming expansion animals become even more useful, methane is an excellent greenhouse gas, so it's likely going to be useful for helping to raise the average temperature (plus if the cows and whatnot are kept in an environmentally closed area the methane could be harvested for use as a clean burning fuel). The dung would be useful for improving soil quality. The grazers can serve to keep the vegetation near the domes from getting too out of hand. Chickens will keep the insects brought over to serve as pollinators under control as well as any pests that manage to evade detection and survive the trip to Mars. seed dispersal.