I am not totally sure the intention was to designate one animal as less desirable than the other, at least in this chapter of Matthew? It could have been more the imagery of mixed flocks of sheep and goats that were common then, but say when the time came to shear them, or to milk them, then a good shepherd would know how to do that instantly...
Although, in certain places in the Old Testament, goats were used as symbols of good things; the delicious meat, or maybe the way a goat could climb the highest mountains and then see very far...however, there are also references in the Old Testament to the mythologic satyrs, part man/part goat, and considered evil...thus lewdness and lust...
So maybe the reference is actually kinda neutral, with just a touch of the heretical "false" religions?
* * *
idk, here are a couple references, see what you think!