Is auto backup the default with Google Photos? It wasn't on my current s21 (I know because I chose not to enable it), and it would seem very dodgy to me (and possibly illegal in Europe - I don't know about the US) for them to make "we'll keep a copy of every image you take" the default, especially on a pre-loaded app.
(Also do Huawei devices even come with it pre-installed? It may not be there unless actively chosen).
Unfortunately "why did this happen?" is a very difficult question to answer. Different devices come with different software, and then people install different apps on them. I've never heard of this, but I've never owned a Huawei MediaPad so don't know what file cleaning or device management software they install, or what other apps you have installed, or how any of that is set up. Were all the lost files in one place, e.g. a "Downloads" folder? If so it just needed some utility to treat that as temporary storage and clean it up (again, I've never seen that happen, but I've always personally regarded Downloads as a temporary storage area, and anything I want to keep I will move out of there to "its proper place". But the point is that if you just left stuff there it only required something to empty that one folder to explain everything you have seen).