Even if you, as the author, know they are entirely imaginary within the world's framework. The characters don't know that. Pretty much by definition.
So religious duties are ones of consequence. Impiety is a public menace. The degree of enforcement will vary widely -- probably chiefly predicated on the frequency and scale of disasters -- and even the scoffers will probably be not atheists but just lax and so clean up their acts really fast -- even with personal disasters. "The Devil were sick, the Devil a monk would be." In good times, they might be slack; the term superstitious came from a Latin term "super-pious" because after all, a man ought not to concern himself obsessively with the gods and their augeries, even though you could be too slack, on the other hand.
On a larger scale -- well, the Pythogereans were vegetarians. Mostly. But even they would attend public sacrifices and accept the lot of meat that fell to them, and eat it. (One of the rites the Greeks tried to force in Maccabees. Then, they were trying to drive everyone in practices they considered pious. Regarding other tribes as equally people means that you start to care about their practices.)
I have heard that the Romans, hearing the Jews had stopped sacrifices in the Temple because of some defilement, had indignantly started to offer sacrifices themselves. I don't know if it's true, but it's certainly plausible.
It's amazing how few works have their characters think that their worship of gods is signficiant. No one ever wonders if the gods are angry with them.