Photoshop version: Unknown but a relatively recent version. I have updated to the latest version since this happened (earlier this week).
I also don't want to try to reproduce this error because it's quite critical.
OS: Windows 10
I went to Preferences, changed my scratch disk from my primary drive (C:) to my files disk (D:) and unchecked C: as scratch disk.
I then went to "Edit > Purge > All".
I suspect that Photoshop then started to delete folders from my (D:) harddisk (there's no other explanation, there were also no files in my trash bin where Windows would put them when I delete them manually) and started doing this in the folders where I was working at that time on. Those folders were connected with a cloud and the cloud reported that I had deleted them locally (which I suspect was triggered by PS) which is why I found about it (it happened immediately after pressing "Purge All").
I was under the impression that PS just deletes memory (RAM) but it seems this action somehow triggered it to read my local files as scratch files and purged them.
We have since restored those files but I just wanted to make sure that this doesn't happen through PS and if it does that you are informed about it.