To reiterate, you've not encountered a bug. As hard as it may be to accept, you have suffered an unfortunate consequence of exceeding your available storage.
You are not the first, and won't to be the last, to learn the hard way about the importance of ensuring that your essential data has been backed-up.
This aside, you should always choose computing devices that best meet your needs - be they Apple, Galaxy (Android), Windows PC or otherwise. Basic practices to backup essential data and documents are consistent, regardless of your choice of computing platforms.