In the United States our Constitution specifically mentions religion. It does not, however specifically mention privacy. Since the right to privacy is not specifically mentioned, there are some who believe there is no right to privacy in the Constitution.
When a Court analyzes a law, it looks at the level of need the government has for the law and balances it against the specific right with which the government is interfering. The scale adjusts based on whether the right is fundamental or something else.
Since there is no doubt that freedom of religion is a fundamental right delineated in the Constitution, any interference with religion will have a strict scrutiny test applied against it. On the other hand, the balance of our privacy rights tends to change based on whether the judge(s) making the decision believe there is a privacy right in the Constitution, as well as the specific underlying type of privacy that is being affected.
Here is a good article on the subject.