Warehouse can protect your resources from being pillaged. The Warehouse can protect your resources from pillaging. If you fail to defend against an invasion of your city, the warehouse will ensure that a portion of your resources are not removed. Upgrading warehouses can protect more resources. Higher your Warehouse level is, the more resources it can protect.