Verses 12-13 “12And it came to pass in those days, that he went out into a mountain to pray, and continued all night in prayer to God.
13And when it was day, he called unto him his disciples: and of them he chose twelve, whom also he named apostles.”
13And when it was day, he called unto him his disciples: and of them he chose twelve, whom also he named apostles.”
Jesus prayed all night and, no doubt, a good deal of this prayer was about the choosing of His disciples, and still He chose Judas Iscariot. Jesus knew that Judas was an unbeliever, and yet chose him anyway, which tells us that God allows some “nonsensical” things to happen that His purpose might be worked out.