Or they made copies of friend's records ("ripping"). the CD-R drive has been around for 2 decades now, and came as a default option on many laptops and desktops in the early 2000s. And before that, people had CD/Casette Boomboxes where you could record CD tracks to the cassette. It was the only way to make mix tapes.
I remember the days of ripping CDs borrowed from friends on a 4x speed drive; back then, you could do 8x but there was a risk of file corruption/recording failure.