From a classical perspective (and I’m oversimplifying in this post), you need a head of state because the head of state is the nation…he or she is the person from whom legitimacy flows, he holds the divine mandate, however you want to put it. Or, as Louis XIV put it, “L’Etat, c’est moi”.
The better question is, “Why isn’t the head of state usually head of government?”, because for a very long time, of course, the head of state was also the head of government. Louis XIV had ministers who decided day to day policy, and he could, if he had wanted (he didn’t) summon the Estates-General to pass laws and vote him extra taxes, but ultimately, the final decision about policy was Louis’, and he could override any of his ministers or bureaucrats. As time went on, though, and the people realized they didn’t neccesarily like having their lives ruled by somebody who’s only qualification was that he was somebody’s son, they set up representative assemblies, which kept stripping more and more power from the monarch. And, since parliaments and legislators had most of the power, they were able to force the Head of State, (from whom, remember, all legitimacy comes), to name the head of the legislative body the Head of State’s “Prime Minister”, who can exercise all the powers that the Head of State used to be able to (subject, of course, to the legislature letting him).
The situation in the United States is kind of different. The US Constitution was written in 1787, using the British government as a model, so when it divided up power, it divided it up (and then codified it) in accordance with the way power was divided up in Britain at the time. And Britain at the time was undergoing that shift in power I mentioned eariler. For example, in Britain, the King was the commander in chief of the army, so the President is the commander in chief of the army. The King could coin money, so the President can coin money. The King enforced the laws and prosecuted criminals, so the President enforces the laws and prosecuted criminals. On the other hand, Parliament imposed taxes and made a budget, so the Congress imposes taxes and makes a budget. Parliament passed laws, so Congress passes laws. Parliament declared wars, so Congress declares war. And since this was codified, it’s been hard to change, and since the President is elected rather than just born to the job, nobody has seen much of a need to change it.
So in effect, the US doesn’t really have a head of government, or maybe you could say it has several. The President is head of those governmental functions granted him, and the Speaker of the House (and, since the official Senate leadership ((the President of the Senate and the President pro Tempore)) is largely ceremonial, the Senate Majority Leader) is head of those governmental functions granted Congress.