The Rat is traditionally said to have won the Chinese zodiac race by outsmarting the Ox.
In the best-known version of the legend, the Rat rides across the river on the Ox and leaps off just before the finish line. That trick allows the Rat to claim first place, while the Ox arrives second.
The story is a later folkloric explanation for the animal order rather than a factual account of how the calendar was created. Historical Chinese calendrical systems use the twelve earthly branches, and the animal associations developed within that wider tradition.
The legend also helps explain why the Rat is first even though the Ox is portrayed as stronger and more diligent. Its theme is cleverness overcoming physical power.