The main purpose is to drain water and prevent rain water from dripping into the corner and wetting the corner when it rains, which is not conducive to the long-term use of the house. Therefore, some farmers like to dig a ditch behind their houses.
In the past, most houses in rural areas were bungalows, only one story high, with tile roofs. There would be no drainage pipes like now, when there was no drainage system. Therefore, in general, the rain on rainy days is directly allowed to flow to the ground through the eaves. However, it is impossible to completely ignore it. Therefore, people will dig a structure behind the eaves, so that when it rains, the rainwater will gather in the ditch and then flow to other places through the ditch to prevent the house from being flooded by water.
In addition, many houses are built on the mountain. Every rainy season or when it rains, there will be a lot of running water on the mountain. Digging a ditch behind the house is not only to drain the rainwater on the roof, but also to ensure that the water flowing down from the mountain will not flood the house.
Secondly, in the past, many houses in rural areas were adobe houses. As the name implies, adobe bricks are bricks made of compacted soil, which are not particularly strong. If you don't dig a ditch, every time it rains, not only will the water flood the heel of the wall, but the water drops from the eaves will also wet the wall. Then, if you are soaked in water for a long time, the wall and adobe will be soft. Over time, it may cause the foundation of the house to be unstable and lead to the collapse of the house. Therefore, digging a ditch is also to increase the service life of the house.
to sum up, many farmers dig a ditch behind their houses mainly to ensure the safety of their living environment and keep the running water flowing smoothly. Although with the development of the times, many areas have no such habits, but this is the crystallization of the wisdom of the broad masses of working people.