Did a bunch of religious people get together and read them and throw away whatever they didn't like?
No more than a small group of radio listeners get together each week to decide what's going to be on the Weekly Top 40. By the time "canonicity" became an issue, there were already informal norms and patterns of usage that already favored certain books over others in various Christian communities. A four-gospel canon was already in place in the mid-second century (as the Diatessaron attests, as well as Justin Martyr's earlier gospel harmony) and the Pauline correspondence was regarded as canonical in the middle of the second century as Marcion also attests. Most of the disputes on canonicity within early orthodox churches concerned the General Epistles and Revelation, e.g. whether 2 Peter was really Petrine and thus on an equal par with 1 Peter, whether Revelation was really Johannine and accepted as authoritative, whether Jude is acceptable despite its use of the pseudepigrapha, whether non-apostolic books like Hermas and 1 Clement are authoritative and worthy of inclusion in the canon, etc. There were also regional variances, such as a rejection of Paul in Syria, a rejection of John among the Alogi in Asia Minor, rejection of Hebrews in Rome, etc. Markedly non-orthodox churches, especially those among various gnostic groups, had different standards and ideas about canon than orthodox groups, and thus accorded semi-canonical status to gnostic tractates that originated within these groups but which claimed apostolic status.