Except at peer tech companies like, say, Google.
Some people get to have affairs with subordinates, others don't. It's a question of if they have the support of the people pulling the levers or not as to whether it's considered acceptable. Universal rules are for little people, once beyond a certain position they are merely tools for selectively shutting out opposition.
+1. I'm sure Danny is well aware of what happened/s at Google.