The Mishna then continues: And how do we know that even five people who
are sitting and involved in Torah study? As it is written "He established
the foundation of His group upon the earth" (Amos 9:6). Even though the
number five is not a number of "klal" and it possible to increase it
(adding one to it creates a new number) there is a dimension of
completeness to the number five which is absent from the number three. And
three has a dimension of completeness that does not exist in the number
two, and in two which is lacking in one. This is why each of these numbers
was chosen.

(The Maharal doesn't view the choice of the numbers in the Mishna as
coincidental. The explanation he gives for the choice of each of the
specific numbers mentioned in the Mishna is also a presentation of the
philosophy of mathematics.)

Counting doesn't start with one, but only when we have two objects.
Therefore two has a quality that is fundamentally absent from the number
one. But two is only a pair, with no separately counted units, for which
we need to go to three, the first odd counting number. As it has been said
"Two is the beginning of the even numbers, and three is beginning of the
separated (odd) numbers."

(The above quote brought by the Maharal is from the Ibn Ezra, Shmoth 3:15.
It is probably one of the lengthiest of the Ibn Ezra's commentaries on the
Torah. In that section, he also discusses the unique quality of the number
nine, in which each number that is divisible by nine has the sum of the
digits add up to nine, and how that is graphically represented by a
constructing a two column representation of a circle, with the number one
in the upper right hand corner, two below it, going down to four at the
bottom, then beginning the left column from the bottom with five, up to
eight at the top of left column, culminating in the number nine at the
top. The consequences of multiplying the nine by any number in either
column produces the preceding/following line of the matrix. The Maharal
actually brings the matrix and explains more about in later in this
chapter, in Mishna 15, when discussing the lesson that tithes are a
protection of wealth.)

The number five has a quality absent from the number three, in that it
also contains an odd number, three plus two. (Four is simply a pair of
pairs, adding nothing that wasn't fundamentally present in the number
two.) The proof text "He established the foundation of His group upon the
earth" (Amos 9:6) is appropriate (even though no number is mentioned) for
the word "agudah" represents a collection, and a full collection would be
two, an even number, with three, an odd number.

Therefore, two is fundamentally different than one, and three is
fundamentally different than two. Four isn't fundamentally different than
the numbers that preceded it (just "more of the same") while the number
five presents a fundamentally new quality that we haven't had in the
earlier numbers.

Why didn't the Tanna didn't simply inform us that the Divine presence
resides with one person involved in Torah study, leaving us to draw the
obvious conclusion that it is true for two, three, five and ten people? To
teach that it preferable and better to be involved in Torah study with ten
people than with five. And involvement with five is preferable to three,
three better than two, and two better than one. Even though the Divine
presence resides even with one, the quality of the attachment one has is
increased when It dwells among two compared to one, it increases even more
among three, even more among five, and even more among ten than among
five.