The twelve signs are often assumed to be the constellations they are named after. They began instead as a mathematical division of a circle, and the distinction explains several persistent confusions.
The band follows the Sun's apparent path
Over a year the Sun appears to move against the background stars along a fixed circle, and the Moon and planets stay close to that same line.
Attention naturally concentrated on the narrow band containing all of these bodies, since everything that moved could be located within it.
Dividing that band gave a coordinate system, which is what any culture tracking celestial positions needs before it can record or predict anything.
Equal divisions were adopted for calculation
The constellations along the band are wildly uneven in size, and some are far larger than others, which makes them unusable as measuring units.
Cutting the circle into twelve equal parts produced a regular scheme in which positions could be stated numerically and arithmetic could be performed.
The number twelve fitted the approximate count of lunar cycles in a year, which made the division convenient for calendar work as well as for position.
Names came from the constellations nearby
Each division was named after the constellation that occupied it at the time the scheme was fixed, which is why the names are animals and figures.
The correspondence was already imperfect then, since the divisions were regular and the star groups were not, and it has drifted further since.
Later readers took the names as identifications, producing the common assumption that a sign and a constellation are the same thing.
Precession moved the alignment
The Earth's axis wobbles slowly, shifting the position of the equinox against the stars over a cycle of many thousands of years.
Because Western practice measures its divisions from the equinox, the whole scheme has slid relative to the constellations by roughly one division since it was established.
This was noticed in antiquity and has been discussed continuously since, so it is neither a recent discovery nor unknown within the traditions that use the scheme.
Other divisions of the same band exist
Indian astronomy uses a scheme of lunar mansions dividing the same circle into twenty-seven or twenty-eight parts, tracking the Moon rather than the Sun.
Comparable systems appear in Chinese and Arabic traditions, which suggests the lunar division was arrived at independently more than once.
These schemes coexist with the twelve-part division in the traditions that use both, since each answers a different question about where something is.