The government could use law to promote or restrict the production or consumption of goods and services.
However, such regulations can have loopholes, e.g. producers passing on the extra costs of production onto the consumer through higher prices, or consumers getting access to banned goods through the black market.