For example, besides providing basic security, justice and enforcement of contracts, government also does pretty well at tackling certain types of infrastructure, emergency preparedness (when public officials do their jobs) and handling ACUTE EMERGENCIES. (Kill Hitler, feed THESE children right now, go to the moon.) Acute needs are often driven by consensus desires that are simply not measurable in terms of ROI.
Government tends to do much worse when taking on CHRONIC PROBLEMS. (e.g. constantly improving our refrigerators or entertainments in response to public taste, providing longlasting and productive jobs, making poverty vanish, creating an ongoing profitable human presence in space.) These are far better handled by a market... perhaps with fine-tuning to ensure that it really is profitably attractive for private capital to step in and address long term needs.