The Hydra base in question was anticipating being attacked on a massive scale.
The Avengers had no reason to even suspect that they were going to be attacked.
This is even highlighted in the conversationdialog:
Nebula -NEBULA: They suspected nothing.
Thanos -THANOS: The arrogant never do.
I realise this only partially applies to the situation, but it also supports that they were completely caught off guard-guard.
For general safety, they did have the barn-door protocol, which would not just shield the outside from the inside (as they had intended) but also the inside from the outside!
That protocol could have potentially saved them from a huge amount of damage. But the attack they faced was way beyond their anticipation.