Here you can protect your resources from getting looted by other players.

The higher the warehouse level, the greater the capacity of resources that can be protected. 

The resources that are not collected from the city buildings are not protected by the warehouse, thus, you must collect them in time.