You can find the answer to this in Chapter 14. There, Diamond tells us that these sorts of institutions developed spontaneously as farming became more widespread.
When societies start to farm, they come to have higher population densities. When population densities increase, social problems arise. Diamond talks about how it can be very difficult for groups of people to learn how to live together in peace when the group gets so big that everyone isn't related to everyone else in some way. He cites the problems the Fayu had with this.
Complex social institutions arise in response to this need. They arise as a way to make sure that large groups of people can get along together reasonably well. Thus, these institutions arise as a response to new needs that are brought on by farming.