Animal rights is not a recent idea. The second caliph Umar, may Allah be pleased with him, assumed responsibility for animal welfare as part of his leadership package. Sheep is just used as an example to show the seriousness of accountability. The point is that a leader should be mindful of all things under his care, even if he is not 'officially' responsible for them.
Dawud ibn Ali reported: Umar ibn al-Khattab, may Allah be pleased with him, said, “If a lost sheep under my care were to die on the banks of the Euphrates, I would expect Allah the Exalted to question me about it on the Day of Resurrection.”
Source: Ḥilyat al-Awliyā’ 137
عن داود بن علي قَالَ قَالَ عُمَرُ بْنُ الْخَطَّابِ رضي الله عنه لَوْ مَاتَتْ شَاةٌ عَلَى شَطِّ الْفُرَاتِ ضَائِعَةً لَظَنَنْتُ أَنَّ اللَّهَ تَعَالَى سَائِلِي عَنْهَا يَوْمَ الْقِيَامَةِ
137 حلية الأولياء لأبي نعيم عمر بن الخطاب