i want u to specifically explain to me how in the crap this is not a database error plz mister i'm a programmer
I...just did.
Plugin files store all the changes compared to the master file (in this case, the Hearthfire plugin file compared to the Skyrim master). The container's reference is stored in the Skyrim master file, and the contents of that container is then overwritten by what's stored in the save file. However if the Hearthfire plugin removes this reference (either accidentally or on purpose, as it changes a lot of things in the player homes), then that reference will be marked as deleted in comparison to the master file. Therefore as far as the game's concerned with the plugin enabled, that container no longer exists. The contents is still in your save file, but the container isn't.
You can think of the plugin files as records in a database, sure (they are, I guess) that constantly override eachother (Save File -> Plugin File -> Master File). But it's not an issue with the programming itself, the way the records are stored or anything like that. If the barrel was intentionally removed to make way for other stuff, then someone chose to do that. If they didn't mean to remove the barrel unless you upgraded to a Child's Bedroom, then that's a bug of course. But it's still a human error in terms of someone set it to remove it before it was necessary.
Someone removed a barrel that happened to have your stuff in it. Whether that's a bug or not, it's a decision someone's made and not a flaw in how the system works.