The Chinese astronomers first created Ten Heavenly Stems (the celestial ch'i and providence) and Twelve Earthly Branches to give some kind of chronological order to the world and allow them to predict earth changes.
Some rely only on birth data while others also incorporate star and planet positions of the Ten Heavenly Stems.
Astrology was difficult for those unschooled to grasp the concept of Ten Heavenly Stems and Twelve Earthly Branches, so legend states that the Twelve Animals were used as a substitute for the Twelve Earthly Branches.
The heavenly stems were originally representative of the ten suns the ancient Chinese believed ruled the earth in ten-day cycles.
These heavenly stems also had correlating Twelve Earthly Branches, and they were used to understand the mechanism that governed the world and gave order to chaos.