The truth is that if it was all a numbers game (Too many girls) then all the boys should be married, and only the girls should be extra. But this is far far from the truth. The truth is that it's very complicated, and there are many factors, including the fact that many boys and girls have all kinds of issues, and they have no-one to talk to, especially sexual issues. If the boys and girls would only have a coach we would not have a shidduch crises.
Having said that, the Talmud does say that shidduch games (In the times of the temple) was egalitarian, where the bar mitzva boy would marry an older girl, and the bat mitzva girl would marry an older boy, in order for the couple to get pregnant right away and have tons of kids (Sanhedrin 104a, on the bottom (See Rashi). How this worked out is very complicated, but the main thing is that all the boys and girls who fell through the cracks were able to marry each other since the system was egalitarian.
Rashi here seems to say that the boy got married at 13, but in Sanhedrin 76b it looks like 12 was also fine. And so does the Medrash say in the beginning of Eaicha, "a boy would get married at 12 (And have a kid 9 months later), and the kid would get married at 12 (And have a kid 9 months later), so before the first one was 26 he was already a grandfather."
You should keep in mind that in the times of the temple when life was good, we had many servants who would take care of all the kids, so don't start kvetching about having so many kids. "Eaicha yoshva bodod "haeir rabosi um" (Ibid 104)
Now why was this complicated? Well, let's see - if all the 12 year old boys married 15 year old girls then how would you have left over boys to turn 15 and marry 12 year old girls? And even if the boy class was bigger because of population growth, how many boys did they already have left over to marry the huge class of 12 year old girls?
So we gotta say something like this. A third of the 12 year old boy class married the 15 year old girls, and the other 2/3 stayed put. Then when these boys turned 15 they married 1/3 of the girl class, since due to huge population growth 2/3 of the 15 year olds = 1/3 of the 12 year olds. Then 2/3 of the 12 year old girls would turn 15 and marry 1/3 of the 12 year old boys, and it would go around and around. And if any boys or girls fell through the cracks they would just marry each other. Pretty cool, Ha? (If you're a mathematician you may want to play around with this)
So at the end of the day you had like 2 groups - group "A" and group "B". At the same time the 15 year old girls were marrying the 12 year old boys in group A, the 15 year old boys were marrying the 12 year old girls in group B (A third of the class), and when the other 2/3 of the girl class turned 15 and married the 12 year old boys in group B, the 15 year old boys were marrying the 12 year old girls in group A.
But it gets even more complicated, because it doesn't say anywhere that the older boy or girl was 15. He could have been 14 or 16 or 17, and the younger boy or girl could have been 13 (I'm getting a headache). Anyway, like I said - whoever fell through the cracks married each other.