It’s peculiar that corporations decide what’s appropriate and not, even in your love life.
Would never date my boss though if I didn't have an exit plan. Doubt you would ever get happy if such a relationship fails.
If we took on more of a French attitude about extramarital behavior (see: https://www.pewresearch.org/fact-tank/2014/01/14/french-more...), it would reduce the power that "the other woman" has... which might actually discourage some from assuming that role.
In the same vein relations between managers and subordinates are not permitted, not to protect the well being of the subordinate, but to protect the well being of the corp.