Why do Du Fu's poems criticize the society and feel sad?

Hello, I'm glad to answer your question.

Du Fu lived in the historical period from prosperity to decline in the Tang Dynasty, and his poems mostly involved social unrest, political darkness and people's sufferings. His poems reflect the social contradictions and people's sufferings at that time, so they are called "the history of poetry". Du Fu is concerned about the country and the people, with noble personality and exquisite poetic skills. Du Fu wrote more than 1500 poems in his life, many of which are famous works that have been handed down through the ages, such as Three Officials, Three Farewells and Du Gongbu Collection. Among them, the "three officials" are Shi Haoguan, Xin 'an official and Tongguan official, and the "three farewell" are newly married, homeless and resigned.

I hope my answer can help you solve the problem. If you still don't understand, you can keep asking me.