It's not a belief. It's fact.
"The Chinese tradition of holding the state responsible for famine relief and water
control was rooted in the Confucian classics. The Confucian philosopher Mencius
(372–289 BCE) insisted that a benevolent ruler should guard against famine by storing
grain during times of plenty and distributing it during times of dearth. Blaming poor harvests
for bringing starvation to the people, taught Mencius, was no less wrongheaded than
“killing a man by running him through, while saying all the time, ‘It is none of my doing. It‘
is the fault of the weapon.’” It was also Mencius who popularized the idea that a ruler’s
Heaven-granted mandate to rule (tianming) was not immutable, and could be revoked if
the ruler ignored Heaven and “lost the people’s hearts” by failing to practice benevolence
(Mencius 1970, I.A.52, IV.A.7–9)."
"
In China the principle that major calamities were connected to the ruler’s conduct
went far beyond the symbolic, and indeed “shaped expectations of imperial and bureaucratic
responsibility” in important ways (Li 2007, 2–3). “In comparative perspective,”
writes J. R. McNeill, the Chinese state “appears remarkable for its ecological role.”
There more than elsewhere “the state took primary responsibility for building and maintaining
many big waterworks” (McNeill 1998, 36–37). In the case of the Yellow River,
erosion and the deposition of sediment caused the bed of the river to rise above the surrounding
plain, so it was necessary to build huge embankments in order to keep the river
in its place. During the period from 1194 to 1852–55 when the Yellow River ran into the
sea south instead of north of the Shandong peninsula (as the strategic breach would force
it to do again from 1938 to 1947), argues Elvin, the scale of the man-made effects that
resulted from the herculean efforts that China’s “river tamers” made to control the
merged flows of the Yellow and Huai rivers “was probably unequalled anywhere in premodern
history” (Elvin 2004, 24, 128, 131–40).
The Chinese state’s commitment to nourishing the people during times of famine
also has a long history. Formative famine-relief measures were codified in China’s first
imperial dynasty, the Qin (221–206 BCE), and the importance assigned to famine
relief increased in the late imperial era (Li 2007, 3). The Qing state in particular
devoted an extraordinary amount of bureaucratic attention and financial resources to
famine relief."
TLDR;
People must be feed to ruler to continue to possess mandate of heaven. Therefore, the various dynasties collected grains and stored them in case of famines or drought. The state therefore feed the populace if their harvest wasn't adequate enough in that regard. The food storage was gathered by the government through the taxation of grains and collection of it. Furthemore, "The importance assigned to famine relief increased in the late imperial era, when a diverse array of local elites worked in tandem with officials to manage and fund relief operations."
The definition of a famine is by the "the United Nations humanitarian criteria, (that) even if there are food shortages with large numbers of people lacking nutrition, a famine is declared only when certain measures of mortality, malnutrition and hunger are met."
So famine did occur a lot yes, but the government actively tried to prevent it to legitimize themselves. Overt corruption and silence during droughts and famine was what caused the destruction of dynasties. And once again to reiterate: So no, agrarian life is not just at the mercy of the elements, but also very much so by the government and their food redistribution policies. "The food redistribution system in early imperial China was ideally designed to benefit all people under heaven “equally” within the framework of the social hierarchy, meanwhile providing extra resources to those of lower status and to people in distress. However, the ideology of the regulations and their actual implementation were frequently out of sync, as laws were applied flexibly and human greed worked every possible step of food redistribution."