Tai Sui's origin lies in a practical problem of ancient Chinese astronomy rather than in myth. Jupiter's real orbital period is close to, but not exactly, twelve years, roughly eleven point eight six years, so a calendar that tried to track the twelve Earthly Branches directly against the planet's actual position in the sky would slowly drift out of alignment over the centuries.
Chinese astronomers of the Warring States and Han periods solved this by inventing a fictitious counter-Jupiter, a hypothetical body imagined to move steadily through the twelve positions in exactly twelve years, moving in the opposite direction to the real planet across the sky, so that its position could be calculated cleanly and used to name years according to a fixed, drift-free cycle. This calculated, invisible body was Tai Sui, an astronomical convenience before it became, in later centuries, an object of religious dread and propitiation in its own right. Around this originally technical device, popular religion built the belief, still widely observed, in one's benming nian, one's own zodiac year recurring every twelve years, understood as a year of heightened vulnerability when a person's fate stands in especially close, and potentially dangerous, relation to the ruling Tai Sui; the common folk remedy is to wear something red, traditionally a red belt, red underwear or a red string bracelet, throughout that year to ward off the associated bad luck. What began as a mathematical fix for tracking Jupiter's calendar thus ended as one of the most widely and personally observed pieces of living Chinese folk religion, followed today by many who have never heard of the astronomical problem that gave the god his name.