Because they were a religion
To begin with, the Jedi and the Sith believe in a supernatural force that underlies everything. What’s more, the Jedi, at least, believe that the Force has a will (and they’re almost certainly right), meaning that they see it as conscious in some broad sense. An omnipresent consciousness that, at least broadly, directs everything, and to which its followers devote their lives? That certainly sounds like a religion to me.
Listen to how Obi-Wan talks about it:
“The Force works in mysterious ways, but it leads us to where we need
to be in order to achieve balance. Many Sith believe that the dark
side holds more power, but that is simply not true.”
Han strained his ears to catch what the old man said next.
“It was the Force that brought me into your life, and it is the Force
that will guide you to your destiny.”
The Princess, the Scoundrel, and the Farm Boy
The Sith may see the Force very differently, but they too believe that it has a sort of consciousness, that it guides their lives. Vader does:
It was his duty to rule them all. He saw that now. It was the manifest
will of the Force. Existence without proper rule was chaos, disorder,
suboptimal. The Force—invisible but ubiquitous—bent toward order and
was the tool through which order could and must be imposed, but not
through harmony, not through peaceful coexistence. That had been the
approach of the Jedi, a foolish, failed approach that only fomented
more disorder. Vader and his Master imposed order the only way it
could be imposed, the way the Force required that it be imposed,
through conquest, by forcing the disorder to submit to the order, by
bending the weak to the will of the strong.
Lords of the Sith
Even Sidious does:
Vader knew the reply. “There are no coincidences, Master.”
“And that, my apprentice, is why Murkhana matters to us. Because the
dark side of the Force has for whatever reason brought that world to
our attention once more—as you should well understand.”
There’s another crucial point, though. The Jedi and the Sith followed the ways of the Force, but they were not the only ones. Many, many other sentient beings followed the ways of the Force purely as a religion, without ever using—or, indeed, being capable of using—the Force in an active sense.
For example, the Church of the Force was an organization of laypeople who follow the ways of the Force. Some among the Lasat believed in the Force, which they called the Ashla. The most detailed description comes from the novelization of Rogue One, which shows that many different faiths are based around the Force, and see it in many different ways:
What is the Force of Others? To ask this, you must ask one question
and a thousand.
To a cultist of the Huiyui-Tni, you must ask, “What is the exhalation
of the true, amphibious god?” To a Jedi, you must ask, “What is it
that binds and defines all life?” To a child of the Esoteric Pulsar,
you must ask, “Show me the secret pages of the Book of Stars.” To a
faithless man, you must ask, “What power enables prophecy and sorcery
in a world controlled by logic and law?”
Rogue One: A Star Wars Story
Indeed, it seems likely that the Force is better-known in many places as a religion: as something that, say, the Church of the Force believes in, than as “that thing that the Jedi use to do crazy things.” There are only 10,000 Jedi, after all, and who knows how many billions or trillions of adherents of the Church of the Force, the Huiyui-Tni, the Lasat Ashla, and so forth.
With all this context in mind, then, it would be accurate, natural, and indeed automatic to refer to the ways of the Force as a religion, and to conceive of the Jedi as religious.