According to the general academic view, the belief in three officials originated from the ancient sacrifices to heaven, earth and water. The "Li Jing" section of "The Ceremony" says: "Sacrifice to heaven to burn firewood, sacrifice to hills, sacrifice to Sichuan to sink, and sacrifice to land." It's about the method of sacrifice, not the fire sacrifice. It was not until the Eastern Han Dynasty that Zhang Tianshi introduced this method into Taoist rituals to drive away disasters and treat diseases. After that, people's faith in the three officials became more and more prosperous.
The birthday of a fairy is often the busiest time. Because most people pray on the fairy's birthday, over time, it gradually evolved into a festival. Then, on October 15th, the birthday of Emperor Shuiguan became the next Yuan Festival.
Emperor Shuiguan, also known as Emperor Gu Sui, is the incarnation of Dayu in legend, which is estimated to have come from controlling water. There are many emperors in the immortal system, but not many have really been emperors on earth. The water official emperor can be counted as one.