Locke and other natural rights philosophers said that the purpose of government is to protect natural rights. Thomas Jefferson agreed and in the Declaration of Independence argued that the protection of rights is the main purpose of government.
Hope this helps! God bless
-vf