The law only exists as long as people both have the power and the willingness to enforce it. Is an action a crime when the person gets away with it? In practice, no because the law has had no effect.
That's not really true.
A law that sits on the books unenforced still has the potential to be enforced. It also serves as a signal of the standards of the society. This can create a chilling effect: even if the police (or whoever enforces the law) wouldn't enforce it, the average person may not know that and may avoid doing whatever the law prohibits just in case.
And even if nobody here and now plans on enforcing the law, just having it on the books creates the potential for people somewhere else or in the future to enforce it.
That's one of the big issues with a lot of modern, "liberal" versions of religion: yes, none of their current adherents would, say, harm a witch, hurt gay people, or enslave their neighbouring nations, but they have no problem propagating a holy book that commands all these things to future people who will interpret the book for themselves. Some of those people will take those harmful passages more seriously than today's liberal believers do.
A truly liberal, loving believer would edit their holy books to remove the objectionable, harmful passages. OTOH, when they choose to propagate their holy books despite the harmful material in them, they're tacitly supporting the harmful material that they don't follow personally.