Free markets work for a lot of things, but they aren't the best for providing services that are needed by everyone. If there is something that everyone in the country needs, like clean water, electricity, roads, law enforcement and health care, then it's most efficient to collectively buy and provide these services. We appoint a couple of people to organise this for us. We call these people 'the government'.