They did, literally, shed their wool.
It was their fluffy winter undercoat, and, come spring, it gradually fell out – if you have cats or dogs, you’ll see this exact process happening all over your sofa and best outfits.
There is evidence that sheep were domesticated 9-11,000 years ago, and that they were being bred specifically for their wool 6,000 years ago in Iran. NB: this is what we have evidence for – sheep may have been domesticated and bred for wool earlier, but we don’t have evidence for that.
Primitive sheep still retain their ability to cast their fleece: