Warehouses are necessary for storing supply or raw materials. Every warehouse has its own purpose and specialization (for storing oil, chemical, manufactured products, etc.). You can select the specialization of your warehouse.
When opening a warehouse, consider its size, location and specialization. For example, opening a warehouse in Cuba when your factories or stores are located in Liverpool is not a good idea because of logistics expenses.
When warehouses are useful
Normally, every store and factory have their own warehouses. So opening warehouses as a separate subdivision is useful in case you manage a huge business empire with several factories of one specialization, which use the same raw materials.
Therefore, it is necessary to purchase these raw materials. You can arrange it, so all the purchases are delivered to one warehouse, from where the supply will be delivered to factories.
Similarly to the finished goods: it is possible to supply them from different factories to one warehouse and from there deliver them to various stores. This will save time in managing raw material. Besides, warehouses are very useful in case of the supply contract cancellation or negative price changes.