I recently fell victim to a very weird AOSP Gallery bug that resulted in all the photos from the Camera folder being deleted. I was viewing a video that I recorded, decided I wanted to delete it so pressed the back button once. Instead of taking me back to the grid of photos and videos in the Camera folder, it brought me to the Album view while still displaying the 'Camera' text at the top left to indicate that I was in the Camera folder. I then held down on the first icon (which I thought was the video I wanted to delete) and pressed delete and confirmed it. When I noticed what has happened (and the deleting dialog staying present), I quickly closed the Gallery app while the deleting dialog was still being displayed. When I checked the Camera folder, all of the photos that I took were gone.
Luckily, barely anything in the Camera album was irreplaceable (I can take pictures of almost all the things again or get very similar photos from family members). I also had copied some of the photos off of my phone for use elsewhere and was able to copy those back manually.
I've since switched to a different gallery application and hid the AOSP Gallery app so this doesn't happen to me again (not sure if I can safely disable it without something else breaking). I also suggest anyone else that isn't already using a replacement for the AOSP Gallery app to use one to avoid something like this potentially happening to you too.