Why have a word for religion?
In most ancient societies, there was no specific word for "religion" as distinct from other aspects of life. Ancient Greek had the word εὐσέβεια (eusebia), which meant piety or proper respect towards the gods, and by extension, parents and rulers. This was a personal virtue, not a system of belief. Another word, θρησκεία (threskeia), referred to external religious observance, particularly participation in the many rites, festivals, and ceremonies that characterised life in the polis. Neither neatly maps onto the modern concept of "religion."
Socrates, often said to have been put to death for irreligion or atheism, was really subjected to the charge of ἀσέβια (asebia) or "impiety," the opposite of the aforementioned, meaning a failure to honour the city's gods and corrupting the young. Such an accusation makes sense only in a world where the lines between "religion" and civic virtue and law are highly blurred. His charge was a character flaw, not a heresy.
Modern European languages derive their word for religion from the Latin religio, meaning something like scruplous attention, only sometimes with a religious or cultic resonance (c.f French: religion, German: Religion, Dutch: religie, Spanish: religión, Italian: religione, Portuguese: religião, and Polish: religia). Cicero famously defined religio as cultis deorum, meaning the "cultivation" or proper worship of the gods, a definition again centring on external religious rites. The elder Pliny also makes an interesting remark that elephants show a sort of religio towards the sun and moon in their alleged habits of washing and purifying themselves before them. Here, presumably, he was not referring to an internal faith commitment.
In late antiquity, the semantic range of religio shifts somewhat closer to the modern term "religion." Augustine's De vera religione uses religio to refer to the right worship of the Christian god, in contrast to pagan cults. In De civitate dei, Augustine fagours an etymology of religio from re-ligare ("to bind again"), in the sense of re-binding humanity to God, perhaps emphasising the primacy of an internal faith commitment alongside external religious rituals.
Even in medieval times, religio was more often used to refer to those who had undertaken an ecclesial vow, not laity. The religiosi are monks, nuns, and friars, not ordinary Christians. Likewise, in medieval and early modern English, the phrase to "enter religion" meant not religious conversion, but becoming a monk. Elsewhere in Europe, "religion" as a discrete noun could refer to a chivalric order, such as the Burgundian "religion of the Golden Fleece." The word "religions" in the plural still largely meant false or corrupted versions of Christianity.
Only in the early modern period does "religion" approach its contemporary meaning, typified by the Peace of Augsburg which made "religion" a constitutional category in its acceptance of two co-existing confessions (Catholic and Lutheran) under the principle cuius regio, eius religio ("whose realm, his religion"). In subsequent decades, Lutheran, Reformed, and Catholic groups distinguished their religiones in terms of doctrine, discipline, and liturgy. Interestingly, at this stage "religion" is used more in the way modern Christians would speak of "denomination."
During the enlightenment, two key shifts occur, whereby religion is understood as a universal human phenomenon, not limited to Christian confession, and, consequently, religion becomes a viable object for comparative study. Enlightenment thinkers popularise the notion of "natural religion" as the minimal rational core common to all true religions, concieved of as accessible by reason and observation rather than via Church authority.
By the late nineteenth century, lecture series and encyclopedias on "The World's Religions" began to exist, consolidating a fixed "list" of those confessions which constituted mainstream religious traditions: Judaism, Christianity, Islam, Hinduism, Buddhism, Confucianism, Taoism, perhaps Jainism and Shinto, each treated as discrete objects of study. Here, it is fair to say, the modern Westerner's idea of "a religion" is fully developed.
Nevertheless, it is important not to see this story as one of straightforward progress. Discrete religious categories with contrasting doctrinal claims work well for the Abrahamic religions to which Westerners are most commonly exposed. But for many religious traditions, something closer to the Ancient Greek understanding of θρησκεία as something seamlessly embedded into social life remains more appropriate. Students of Buddhism will be aware of how unhelpful trying to distinguish Buddhist traditions along the lines of concrete doctrinal clashes can be.