I noticed iTunes Match was disabled, and upon enabling it, iTunes reported, “You now have 59 songs available in iTunes Match” (there should be more than 10,000) and my local iTunes library was reduced accordingly. Even that number, 59, doesn’t make sense, since I’ve purchased far more than that!
So sometime between September and now, something has happened that completely wiped out iTunes Match’s understanding of the composition of my library. - DaFacto
But when you delete all your music from your Mac and only keep it in the cloud, it's your own fault. If your data is stored in only one place, being it a physical drive or the cloud, it means you don't have a backup.
No backup = dataloss somewhere down the line is a given, not a possibility.
That's why I don't get why Apple doesn't backup iCloud Drive with Time Machine when it's configured on a Mac. They're basically forcing users to store their data without a backup system the user controls. Terrible.