The invention of farming led to the development of complex societies because it opened up the opportunity people to grow their own crops making goods readily available to these people. Farming was also a form of trade, people could trade their crops for other goods, and finally I prevented people from having to travel constantly looking for a source of food, and instead of killing livestock for food they could use livestock for trade and other means.
Hope this helps!