12 was a very important number in Jewish culture. 12 signified 'perfection'. Part of the reason that 12 was special was that it is the smallest number that has a great number of factors (eg 1,2,3,4,and 6 all divide into 12 with no remainder. No other small number has so many factors).
As a result, 12 was used as a 'perfect' number - such as 12 symbols of the zodiac, 12x2 hours in the day, 12x5 seconds to the minute and minutes to the hour, 12 tribes of Israel and so on. In Revelation, the number in heaven is stated as "144,000" - ie 12 X 12 thousand. In other words, the number is not a literal number but signified a perfect multitude.
Jesus did not only have 12 close disciples, but he also had an inner group of intimate friends Peter, James and John (3 = a quarter of 12) and also a larger group of 72 adherents (half of 12 X 12). After Jesus' death Judas killed himself leaving just 11 disciples. After the resurrection and ascension, the disciples then agreed that the 12 should be restored, and so the replacement disciple, Matthias, was elected to take Judas' place, restoring the number to the perfect 12.
Jacob fathered 12 sons. They are the ancestors of the tribes of Israel, and the ones for whom the tribesare named. Each occupied a separate territory
It was to fit in line with the works of Revelation to fulfill prophesy about Heaven.
14 And the wall of the city had twelve foundations, and in them the names of the twelve apostles of the Lamb.