Say you went to an empty settlement, maybe to restore power. You're bumbling around, looting the place of everything not welded to the floor. You open sample storage, but forgot to go to CMD to disable the alarms first!
"No worries!" you think to yourself. "Even though these guards appeared out of nowhere, I can just go back to CMD, disable the alarm, then return to collect my samples!" You head to CMD, turn off the alarms, and end the annoying red flashing lights. You head back to IND or LAB, and open up another sample to pilfer.
But the alarms, they're BACK! The room is flooded with guards again! After a tense firefight, you make your way back to CMD, and discover alarms are still disabled. Re-enabling them and disabling them again at least turns off the sirens. So you decide to turn off all the turrets too, since there's one more IND building to loot.
And once more, opening the sample storage triggers the alarms. You take out the guards AGAIN, and run back outside. But this building is next to the landing pad, and there's a turret out front. "Good thing I turned that off!" is the second-to-last thing to go through your mind, right before those high-caliber anti-personnel rounds that seem to come from that "disabled" turret…