The reason for government is that people want protection. Government, to finance protection, collects taxes. But government has power, so that it can give some people more than their fair share of benefits from the taxes. It can give things besides protection, such as business subsidies and business bail-outs. Political parties are formed to compete for these extra benefits.
The benefits are not free. Government has nothing of its own to give. It cannot give to one segment of society without first taking from another segment of society. That is why it is said that the purpose of government is to rob Peter to pay Paul and the purpose of political parties is to sort out who gets to be Paul and who has to be Peter.
In a democracy, each political party tries to attract a majority of votes to its candidates so that it can be Paul. It does this by promising things that voters want, by hiding or disguising things that its powerful members want but most voters do not want. In short each political party tries to fool more voters than the other political party.
The criticism this answer received warrants a statement as to the background from which it was made: It answers a question about politics today; today the U. S. is a democracy; neither the question nor the answer pertain to an 18th-century republic. The composer of the answer had a career in bureaucracy and a Masters degree in Public Policy and Administration and service in both the national headquarters and as a district organizer of a Presidential campaign and a summer internship in the Capitol Hill office of a U. S. Congressman. All this accompanied by a now almost life-long enjoyment of history books, including books covering the constitutional history of the early republic, and capped by 18 graduate semester hours of history.