Behind this little gag, there is some interesting history.
In the early Middle Ages the reformed Papacy of the Catholic Church found that it needed to prevent priests marrying, because the rapid development of legal systems across Europe meant that inheritance situations were working to reduce church property holdings alarmingly.
Meanwhile, Islam was finding that one of the costs of Jihad was a smaller number of men relative to women, so in effect they needed an 'occasional' mechanism for dealing with widows and orphans.
Religion is nothing if not a spiritual solution to a material problem.
In Christendom unattached women — not just because of battle casualties, but also because of priests acting all celibate — led to an apparent witch problem.
One can also detect that beneath all the practicalities, one of these religions regards all lustful unions as sinful, while the other sees them as a path to spiritual development.
The reverse applies to wine, apparently.