A race set at Kailash — a circuit of the three worlds. One brother flew off on his peacock; the other stayed right there.Kartikeya flew off on his peacock. Ganesha looked at his mouse, then at his parents — and walked seven times around them.He said: for me, my parents are the three worlds. When Kartikeya returned, the race had already been won.In the Shiva Purana the prize is the first marriage. The boon 'Ganesha first' Shiva gave separately; folk telling joined the two.
Source
Shiva Purana, Rudra Samhita (Kumara Khanda); folk tradition