What does marriage have to do with it?
The text on this rest-area condom-vending machine reads, in relevant part: "The best method of AIDS prevention is abstinence before marriage and a monogamous relationship during marriage."

OK, if you want to make the point that abstinence is the best way to prevent sexually-transmitted disease, that's one thing. However, people shopping for condoms may be considered beyond the abstinence message -- so maybe monogamy is a reasonable thing to recommend. But marriage? This is surely beyond the point about STDs.
Has religion once again ruined a teachable moment for health science?
Cross-posted from the Family Inequality blog.
No.
I think you're making a huge overstatement here based on what I see in the piece.
Firstly, the "teachable moment" is made. The point about abstinence and monogamy being the best way to avoid STD's is made.
"Marriage" here does not necessarily equate with "religion". It's apparently just added on at the vendor's whim, but I just don't see any specific mention of religion. Marriage can take place in a secular context. If that's the way the vendor chooses to make the point, it looks like a small thing.
Their listing on Manta describes them as follows: "Manufactures & Distribute Condoms."
Although ads appearing thereunder carry the disclaimer, "The ads are not affiliated with Hygeia Corp," the only two links (which are locally targeted) are for a "Christian Psychologist Counseling Christians" and a "Christian Recovery Center."
Math time.