Prime ministers are civil servants because they are paid by taxpayer dollars. The primary role of a prime minister is to defend the country's citizens from anything that may harm them, whether that means poverty, disease, hunger, weather or an invading army. A prime minister is the ultimate form of a civil servant as someone whose duty it is to foster public policies that help a particular country.
Like other elected leaders, prime ministers are civil servants who owe it to their constituents to fairly represent them at all times, be honest and look out for their best interest. Prime ministers need to take the consensus of the people into account when signing anything into law as well.