They chose Matthias - whose feast we celebrate today - because, as Peter said, "it is necessary that one of the men who accompanied us the whole time the Lord Jesus came and went among us, beginning from the baptism of John until the day on which he was taken up from us, become with with us a witness to his resurrection" (Acts 1:21-22).
The Holy Father Pope Benedict XVI devoted one of his Wednesday general audience addresses to the figures of Judas and Matthias. He said this of Matthias:
In conclusion, we want to remember he who, after Easter, was elected in place of the betrayer. In the Church of Jerusalem two were proposed to the community, and then lots were cast for their names: "Joseph called Barsabbas, who was surnamed Justus, and Matthias" (Acts 1: 23).
Precisely the latter was chosen, hence, "he was enrolled with the eleven apostles" (Acts 1: 26). We know nothing else about him, if not that he had been a witness to all Jesus' earthly events (cf. Acts 1: 21-22), remaining faithful to him to the end. To the greatness of his fidelity was later added the divine call to take the place of Judas, almost compensating for his betrayal.
We draw from this a final lesson: while there is no lack of unworthy and traitorous Christians in the Church, it is up to each of us to counterbalance the evil done by them with our clear witness to Jesus Christ, our Lord and Saviour.