With Judas having betrayed Christ and then committing suicide, the 11 remaining disciples decided to replace Judas with a new 12th apostle in accordance with the fulfillment of prophesy. In this regard the answer is YES, it was necessary, otherwise the people in the region that Judas was to minister to would have to go without an Apostle to direct them. In other words, they would be leaving a city without spiritual leadership.
16 "Men and brethren, this scripture must needs have been fulfilled, which the Holy Ghost by the mouth of David spake before concerning Judas, which was guide to them that took Jesus.
17 For he was numbered with us, and had obtained part of this ministry.
18 Now this man purchased a field with the reward of iniquity; and falling headlong, he burst asunder in the midst, and all his bowels gushed out.
19 And it was known unto all the dwellers at Jerusalem; insomuch as that field is called in their proper tongue, Aceldama, that is to say, The field of blood.
20 For it is written in the book of Psalms, Let his habitation be desolate, and let no man dwell therein: and his bishoprick let another take".
24 "Pour out thine indignation upon them, and let thy wrathful anger take hold of them.
25 Let their habitation be desolate; and let none dwell in their tents.
26 For they persecute him whom thou hast smitten; and they talk to the grief of those whom thou hast wounded".
The requirements to replace Judas, were that a man had to have been with the Disciples the entire time of Jesus’ ministry, and to have been a witness of the resurrection and ascension (Acts 1:21-22). The 11 disciples proposed two men: Joseph called Barsabbas (possibly the same person as Barnabas), and Matthias (Acts 1:23). The 11 disciples then prayed for the Lord’s direction (Acts 1:24-25), and then cast lots, and the lot fell to Matthias (Acts 1:26).
But, was this the Lord’s choice? Some propose that Paul, not Matthias, was God’s choice for the 12th apostle. They argue that Jesus had told the apostles to wait for the coming of the Holy Spirit (Acts 1:8) and that casting lots is not how the disciples should have made the decision.
They also point out that Matthias is never again mentioned in the New Testament, while Paul obviously became very prominent in the early Christian church. So, are they correct that Paul, not Matthias, was God’s choice to be Judas’ replacement as the 12th apostle?
The New Testament nowhere condones or condemns the way the apostles made the decision in Acts 1. Casting lots was a biblically allowed method of making a decision. Proverbs 16:33 - The lot is cast into the lap; but the whole disposing thereof is of the Lord.
And, while Matthias is never again mentioned in the New Testament, the same can be said for most of the other 11 apostles. Church history records that Matthias died as a martyr for Christ, as did all of the other apostles, except John. Paul was definitely more prominent than Matthias, but Paul was more prominent than any of the 12 apostles, except for perhaps Peter and John. Also, Paul would not have been qualified based on the apostles’ criteria (Acts 1:21-22). So, a conclusive biblical case cannot be made for the 11 apostles’ choice of Matthias being invalid.
Further, God is sovereign. If it was not His sovereign will for Matthias to be chosen, Matthias would not have been chosen. It could be argued that, while it was God’s sovereign will (what He ordained) for Matthias to be chosen, it was God’s perfect will (what He desired) for the apostles to wait for Paul. But, this would be pure speculation, as, again, the Bible nowhere condemns Matthias being chosen for the 12th apostle.
So, what name will be written on the 12th foundation in the heavenly Jerusalem (Revelation 21:14)? The Bible does not explicitly say, but it likely will be Matthias. Ultimately, though, we will have to wait to find out.