It is very simple.
Medical knowledge advanced to the point where it was recognized that if the man was positive for a particular factor, and a woman was negative, there could be complications in pregnancy that threaten mother and child. Specifically, the woman could become exposed to the child's blood, and have a severe allergic reaction. IIRC, 70% of the population is positive on this factor, so problems should come up in 21% of couples.
At this point it made sense to have the blood test and be sure that the couple knew if there could be a problem.
Since then medical knowledge has progressed to the point that we know how to prevent those medical complications. So we can worry about it later.
On what you said about the religious officer, you need to consider implied threats. Whether or not that was the intention, if you're pulled over for speeding and the officer hands you religious literature, the natural tendancy is going to be to perceive (and react to) an implied threat. Therefore we prohibit the behaviour.
The State or its representatives in the line of their duty may not coerce you, explicitly or implicitly, to act in accord with any particular religious views.
Cheers,
Ben