The original meaning of “pagan” was not “someone who doesn’t follow a religion.” Its history is a little more complicated.
The English word pagan comes from the Latin paganus. In ordinary Roman usage, paganus could mean a country-dweller, villager, rustic, or more generally a civilian rather than a soldier.
The Latin root pagus referred to a rural district or countryside area.
Later, as Christianity spread through the Roman Empire, Christians began using paganus for people who were not Christians. Exactly how that change in meaning happened is debated. One traditional explanation is that Christianity became established in towns before some rural areas, so paganus—“country person”—became associated with people who continued following older religions. Another explanation connects the “civilian” meaning with early Christian language portraying Christians as soldiers of Christ.
By late antiquity, therefore, “pagan” increasingly meant a person who followed the traditional non-Christian religions.
There is an important distinction here:
Originally: paganus = country-dweller/rustic/civilian.
Later Christian usage: pagan = someone outside Christianity, particularly a follower of the older polytheistic religions.
Modern usage: Pagan = someone identifying with one of a broad range of contemporary Pagan religious or spiritual traditions.