Wow! I had Microsoft OneDrive do this to me one day; it deleted ALL my photos (I have an extensive, heavily organized photo collection, just over 20 GB at this point) from my all of my linked devices. Effectively, it completely erased nearly 50 years of photos! I was horrified that it would do such a thing! Happily, I follow a highly redundant backup strategy and was able to get most of them back from backups. The most recent photos had not been backed up yet and were totally lost until I got on the phone with Microsoft technical support. They hunted around on their servers and found and restored the last few dozen or so photos.
I never, never, never allow any of my media to be tied up in ANY proprietary format program, such as Photos. I manage my entire photo album as a simple folder tree on my Mac, with one subfolder for each year and all of the photos that I kept for that year stored in that year's folder. Each photo is kept in an industry standard format, usually JPEG. Together, this is an entirely application-agnostic and machine independent way to store photos and as such I can (and have) transferred the entire album to my vintage Macs, to vintage Windows and to Linux. JPEG is JPEG - it works everywhere - and all OS support folder hierarchies. This setup is entirely portable and completely machine/app independent. The entire collection is therefore just another set of folders on my Mac, and gets backed up regularly when I do backups.
I also refuse to allow any proprietary format backup program, even Time Machine, to get involved in backing up my files. Instead, even though it is slower than some of the highly optimized backup programs available out there, I manually copy all of my folders/files from my Mac onto my backup drives...no compression, no proprietary format. The files are all transparently there, immediately available via Finder. I can simply plug in my backup device, wait for it to mount on my desktop and then restore any file or set of files I want by simply copying them from the backup device to the Mac.
The same approach is true for my music. I am "old school" - I have CDs for almost all of my music and have over the years systematically ripped each new CD I purchase. I keep all of my music files in the same manner as my photos. I have a top level folder for Music, then a subfolder per artist, and within each artist, a subfolder per album I have from that artist. All of the songs from any given album are in that album's folder, each an independent, titled music file. All the music files are kept in an industry standard format (in this case, MP3). This setup too is therefore completely application and machine independent, and I have transferred the collection to my vintage Macs, my vintage Windows boxes and to Linux.
SO... keep redundant backups and never, never, never let your media be tied up into a proprietary format. If you do not do this, at some point you will inevitably lose access to the files, or perhaps even the files themselves!