In the market resources are allocated in a way so as to maximize social welfare. Goods that are most highly valued have their prices bid up which then gives direction to reduce consumption of that particular good while also inducing additional resources to be allocated to that good. As prices are bid up, profits in the creation of that good increase. These profits signals induce companies to allocate resources to that highest valued good. The end result is that resources are allocated to their highest valued end. This is economic efficiency. In this manner the free-market maximizes social welfare.
The government does not have these same signals as to where they should allocate resources. Take for instance law-enforcement. How much resources should be allocated to law enforcement? The only signal they have is how successful law enforcement is. But what they can't determine is how highly valued that end is.
This is essentially the socialist calculation debate. When ever the government acts in the economy, that is socialism. As Mises and Hayek showed, socialism cannot work better than capitalism because it cannot allocate resources efficiently.