Why were there only 12 apostles?
Certain numbers appear frequently through the text of the Bible, much more frequently than you would expect from mere chance. Twelve is one such number and its repeated use indicates foreshadowing in the Bible and it is a reflection of the fact that the whole Bible is written by one author, God.
Jacob, also known as Israel, had twelve sons. From these sons come the twelve tribes of Israel. However, the number is strange because Levi, being the priestly tribe, is not counted as a tribe most of the time and Joseph's two sons, Manasseh and Ephraim, are added to the list in place of Joseph.
Because there were twelve tribes, the number appears frequently when representatives are selected from the tribes; for example, the twelve spies sent into Canaan. While it is not said, I suspect this is why Jesus selected twelve apostles. His church became a spiritual version of Israel. "For he is not a Jew who is one outwardly, nor is circumcision that which is outward in the flesh; but he is a Jew who is one inwardly; and circumcision is that of the heart, in the Spirit, not in the letter; whose praise is not from men but from God" (Romans 2:28-29). In addressing the church, James refers to Christians as the twelve tribes scattered abroad (James 1:1). It was fitting that the new Israel be lead by twelve representatives of Christ -- the twelve apostles.
Revelation plays on this theme by speaking of the 144,000 (12 x 12 x 1000); in other words, all (1,000) the people from the Old Covenant (12) and the New Covenant (12). Heavenly Jerusalem is seen as having twelve gates (Revelation 21:21), each gate is named for a tribe (Revelation 21:12), and they are founded on foundations, each named for an apostle (Revelation 21:14).
Twelve appears in the physical world as well. There are twelve months in a year. A day is divided into twenty-four hours, twelve in the day and twelve in the evening, just as there are two covenants represented by twelve tribes and twelve apostles.
So while we can't say with absolute certainty why twelve, we can see that God is using the number twelve repeatedly to represent His people.