The earliest publication for the “Baa, baa black sheep” rhyme or poem was 1744. The Music that we know today was first published in the early nineteenth century. The song makes a link between wool and sheep. Babies imitate the sounds or noises that animals make – onomatopoeia – as part of learning through playing.
The rhyme has had its controversial moments too but it seems unfounded. That is there is no way to prove or disprove any controversy.