Viewed functionally, infrastructure facilitates the production of goods and services , and also the distribution of finished products to markets , as well as basic social services such as schools and hospitals ; for example, roads enable the transport of raw materials to a factory .