Commentators include multiple reason. Sheep tend to be obedient followers. Goats tend to be disobedient. In Jeremiah 50:6 and John 10 sheep are pictured as followers. The issue in Jeremiah 50:6 is the shepherds.
As the shepherd separates (ὡσπερ ὁ ποιμην ἀφοριζει [hōsper ho poimēn aphorizei]). A common figure in Palestine. The sheep are usually white and the goats black. There are kids (ἐριφων, ἐριφια [eriphōn, eriphia]) which have grazed together. The goats devastate a field of all herbage. “Indeed they have extirpated many species of trees which once covered the hills” (Tristram, Natural History of the Bible, pp. 89f.). The shepherd stands at the gate and taps the sheep to go to the right and the goats to the left.
Robertson, A. T. (1933). Word Pictures in the New Testament (Mt 25:32). Nashville, TN: Broadman Press.
The parable’s portrayal of the righteous as sheep and the wicked as goats may stem from their relative value to the owner. Goats were sometimes disobedient to the goatherd (Babrius 3.2–3), probably more often than sheep to the shepherd. Moreover, sheep cost more than goats did (Jeremias 1972: 206), and because of their greater utility and value, they were nearly always held in greater quantity.
Keener, C. S. (2009). The Gospel of Matthew: A Socio-Rhetorical Commentary (pp. 603–604). Grand Rapids, MI; Cambridge, U.K.: Wm. B. Eerdmans Publishing Co.
The Jeremiah passage seems to parallel to John 7:29.
6 “My people have been lost sheep. Their shepherds have led them astray, turning them away on the mountains. From mountain to hill they have gone. They have forgotten their fold. 7 All who found them have devoured them, and their enemies have said, ‘We are not guilty, for they have sinned against the LORD, their habitation of righteousness, the LORD, the hope of their fathers.’
(Jer. 50:6–7, ESV)
Then the Pharisees responded to them: “Are you fooled too? 48 Have any of the rulers or Pharisees believed in Him? 49 But this crowd, which doesn’t know the law, is accursed!”
(John 7:47–49, ESV)
Apparently in this passage, the shepherds are the priests and the rams (male goats) are political/military leaders.
“Flee from the midst of Babylon, and go out of the land of the Chaldeans, and be as male goats before the flock.
(Jer. 50:8, ESV)