Interval naming is a bit non intuitive.
It starts with the interval between two identical notes being a perfect unison, or perfect prime. The word prime comes from the number one. In maths, we would normally describe the difference between two identical things using the number 0. But in music we use 1, which may lead to off-by-one mistakes.
It continues. The interval between adjacent scale steps is a second, coming from number 2, rather than 1. And so on. Octave, the word originating from 8, describes an interval of 7 steps apart.
If you add another 7 steps to an octave, you get two octaves, but the resulting name will be quint-decima, originating from the number of 15 = 1+7+7, rather than 8+8.
The interval names in western theory are based on steps of the western 7-note scales, rather than the pool 12 chromatic notes used to build these scales.
So to answer the question "why?" – because certain names were invented long before more modern theory and approach to conceptualize music, and now nobody dares to change it. Note that early music often didn't even span beyond a single octave. Moreover, when analyzing western music, it is more natural to think in terms of scale steps, rather than semitones.
number-of-octaves * 7 + 1, because there are indeed 7 diatonic notes per octave, but you also count the first one. – phoog Sep 12 '23 at 17:21