Warehouse is commercial building where we store goods and which can later on be transported to the retail stores or customers etc. directly by the various transportation companies.
As we just read it in the definition that we need warehouses to store the good but its main purpose is to solve the space issues, product flow problems and safety of the product.
Warehouse is normally used by manufacturers, importers, exporters, wholesalers, transport businesses, customs, etc. to store goods.