Costs of production not borne by the firm but passed on to society (e.g. pollution), are known as spillover or external costs, or negative externalities. The government must reallocate resources away from areas where spillover costs exist and toward areas where spillover benefits are large (e.g. health and education).
A firm which pollutes water is imposing costs on society in the health problems it may cause for some, and in the clean-up that will be necessary; these are spillover costs. A spillover benefit exists when a firm operates its own clinic: healthier employees represent a benefit for the entire society since they are less likely to need health care from the government.