The Min River comes down fast out of the mountains into the Sichuan basin, and in the third century BCE the local governor Li Bing and his son built the Dujiangyan works to manage it: a bank splitting the river into an inner and an outer stream, a spillway that returns excess water and silt to the outer channel, and a channel cut through a ridge to carry irrigation water onto the plain.
The system works without a dam, has been maintained continuously for over two thousand years, and made the Chengdu plain agriculturally secure enough to be called a land of abundance. Li Bing was subsequently worshipped as a god, and the Erwang temple, the temple of the two kings, stands above the works and honours him and his son. An annual water-releasing ceremony marks the reopening of the channels after the winter maintenance.
This is a clear example of a pattern common in Chinese religion and rare elsewhere: a historical official, remembered for a specific public work, enters the pantheon by popular acclamation and later imperial confirmation, receives temples and a title, and is petitioned about the thing he was good at. The same logic produced city gods, and the deification of Guan Yu and of many local worthies.
Whether Li Bing's son existed is doubted by historians, which does not affect the cult in the slightest, since the temple has honoured them together for many centuries.