The Thema Mundi
The origin of the traditional system of zodiacal sign rulerships lies is the mythical horoscope for the birth of the world known as the Thema Mundi. The Thema Mundi was used as a teaching tool or a conceptual device in Hellenistic astrology, and in that system it provided the rationale for sign rulership, the exaltations, the nature of the aspects, and certain significations of the signs.
Although there are a few different variations of the lore surrounding the Thema Mundi, all versions have Cancer rising with the Moon in Cancer and the Sun in Leo, with the rest of the visible planets fanning out in zodiacal order based on their relative speed and distance from the Sun.
The Thema Mundi has Cancer rising partly due to an older Mesopotamian belief that the conjunction of all of the planets in the signs of Cancer and Capricorn indicated the periodic creation and destruction of the world. According to legends ascribed to the early 3rd century BCE Mesopotamian astrologer Berossus, when all of the planets are conjoined in Cancer was said to indicate the destruction of the world by a great flood, and when they all conjoin in the the sign Capricorn it was said to indicate the destruction of the world by fire.
Another reason for the Cancer ascendant is probably the fact that in Egypt, where Hellenistic astrology likely developed, the heliacal rising of the fixed star Sirius in the mid summer would indicate the annual flooding of the Nile river. Sirius was the 1st star in the Egyptian decanic calendar which was used to designate the beginning of the Egyptian year.
The 4th century astrologer Firmicus Maternus lets us in on a bit of a secret about the Thema Mundi though. He says
There was no birth chart of the universe; for it did not have any certain day of origin. There was no one there at the time when the universe was created by the plan of the divine Mind and foreseeing Will. … The divine wise men of old invented the birth chart of the universe so that it would be an example for astrologers to follow in the charts of men. (Firmicus Maternus, Mathesis, 3, 9, 10, trans. Jean Rhys Bram)
Persian astrologers later developed a myth of their own involving the Thema Mundi in order to explain the rationale behind the rest of the traditional sign rulerships. I created a revised, more modern version of this myth in the form of an animation a couple of years ago when I was learning flash. I took a bit of artistic license with the story, but the gist of it is still the same. You can watch the animation over on my article How the Classical Planets Came to Rule Two Signs.