iTunes Match lets you "upload" your library to Apple. It matches your library against Apple's catalog. If they have the song, you get a copy of their version of the song. If it doesn't have a match, they retain your uploaded file.
I have a lot of random local music that isn't on iTunes, and which you can't easily find anymore. For years, I was paranoid about losing my ripped copies of the files, but iTunes Match has preserved them for me, in the cloud, for years now.