Two ways to give a decan its ruler
The scheme most horoscope sites use gives each decan to a sign of the same element, in zodiac order, starting with the sign itself. The fire signs run Aries, Leo, Sagittarius, so the decans of Aries go to Mars, the Sun and Jupiter. The same rule is the drekkana of Indian astrology, and it spread in Western astrology in the 20th century, with Pluto, Uranus and Neptune standing in for Scorpio, Aquarius and Pisces.
The older Chaldean order comes from Hellenistic astrology. It walks the seven classical planets in order of their apparent speed, Saturn, Jupiter, Mars, the Sun, Venus, Mercury and the Moon, starting with Mars at 0° Aries and running without a break through all 36 decans. That is why Pisces ends on Mars and Aries starts on Mars again.
Medieval astrologers called these decans faces. Run through the hours of the day, the same order of planets also sets the order of the seven weekdays.
In the 1890s the Hermetic Order of the Golden Dawn tied the Chaldean decans to the Tarot: the 2 to the 10 of each suit, 36 cards for 36 decans. Wands go to the fire signs, Cups to water, Swords to air and Pentacles to earth, and each card is a planet in a sign, so the 2 of Wands is Mars in Aries and the 10 of Cups is Mars in Pisces. The minor arcana of the Rider-Waite-Smith deck (1909) draw on these meanings.
Where decans come from
Decans began as star clocks in ancient Egypt. Priests watched 36 groups of stars rise before dawn one after another, a new one roughly every ten days, and used them to tell the hours of the night. The oldest surviving star tables are painted on the inside of coffin lids from around 2100 BC.
The round zodiac of Dendera, carved on a chapel ceiling in the temple of Hathor in the 1st century BC, shows the 36 decans circling the twelve signs. By then astrologers in Egypt had set three decans in every sign, 10 degrees each, and astrologers still divide the signs this way today.