Jesus originally chose 12 disciples out of his many followers. But after Judas betrayed Jesus and eventually killed himself, there was a hole in that original number. So, the remaining disciples prayed and cast lots, eventually deciding on Matthias to rep.