Short answer:
Further detail:
Thomas Hobbes published his political theory in Leviathan in 1651, following the chaos and destruction of the English Civil War. He saw the natural state of human beings as one in which persons were naturally suspicious of one another, in competition with each other, and acted with evil and violence toward one another as a result. Forming a government meant giving up personal liberty, but gaining security against what would otherwise be a situation of every person at war with every other person.
John Locke published his Two Treatises on Civil Government in 1690, following the mostly peaceful transition of government power that was the Glorious Revolution in England. Locke believed people are born as blank slates--with no preexisting knowledge or moral leanings. Experience then guides them to the knowledge and the best form of life, and they choose to form governments to make life and society better.