I came right back though and found all my crops and turrets, and even my generators were all destroyed.
Is this a bug ?
I wish I could say. I had something like this happen at the Castle just a little bit ago. I sent one of my people at another settlement out for a supply run (to the castle) , and when I came back to the Castle a couple days later, everything was destroyed, despite having excellent defenses set up. Hell, that settlement even destroyed a vertibird without me ever firing a single shot. I only lost one turret in that incident.
Fortunately, I was able to repair everything, but it took forever to fix.