Most soldiers (both sides) were rather well-versed in the Bible. For many, the Bible was the book which was used as the primer when they were taught to read, and was the only book in the house (books were comparably quite expensive back then). Church attendence was common to most families, and most of the social life of small towns and villages revolved around the churches. In addition, death was well-known to people of that era, large families were created in the hope that a few children might survive, and death from accident, disease, and child-birth were common.
Herman Melville's Moby Dick was first published about 1854, and Melville assumed that most readers would well be aware of the contradictions involved in naming a child "Ahab" (as was the captain of that vessel), and that a Quaker would be consumed by hate and revenge against any creature. These days, most people wouldn't know who King Ahab was, and why this wouldn't have been considered an appropriate name for a child.