It was also common to have a collection of CDs you owned and wanted to put on a device like this.
Exactly. I mean sure, people were definitely pirating music. But lots of people are own huge collections of CDs, and you could also just borrow other people's CDs to rip them. We were kids without money, but older folks at the time did spend money on CDs.
We forget that the labels also consider that piracy. For a while there were attempts to make CDs un-rippable.
Streaming (which pays labels and artists much less) only exists because it's the compromise that solves the "service problem" side of piracy.