Machu Picchu has a lot of terraces.
The really narrow terraces in front of the temples were mostly to prevent erosion from destroying the temples. They probably had decorative flowers. They do not have any irrigation, which makes it unlikely they were used for farming.
But there were plenty of farming terraces on the other side of the mountain.
And higher up on Machu Picchu mountain.
And generally all around the city.
All of the stone chips created from carving the stones for building are put in the bottom of the terraces for drainage. This was important because Machu Picchu gets a lot of rain.
There were even more terraces down below the city. These were probably partially defensive because they make it hard to get up the mountain without being seen, and easy to block people because the only way up is the stairs.
