There is a reason, and it comes from trying to fit the perfect fifth into the octave.
A fifth is close to the ratio 3:2, which is the most consonant interval after the octave. Stack fifths and you keep generating new pitches. The question is when you land back near where you started.
Twelve fifths is almost exactly seven octaves. Almost: the discrepancy is the Pythagorean comma, about a quarter of a semitone. Close enough that twelve is where the circle nearly closes, and no smaller number comes anywhere near.
Equal temperament then spreads that error evenly, making every fifth very slightly narrow so all keys are usable. Twelve is the smallest division that gives good fifths and thirds at once.