RE the idea that the captain must not have a relationship with a subordinate -- I'm about to make a strange comparison here, so bear with me.
I can understand why there would be rules against such a thing, for all the reasons outlined by folks upthread -- favoritism, things getting awkward if it doesn't work out, and the potential for ethical dilemmas.
That said, regardless of rules or humanity evolving past pettiness, human nature is what it is.
This is something I've been thinking quite a bit about the last week because at the Expanse, our weekly rewatch party/live chat centered around "A Night in Sickbay," so many of these questions are in the process of being explored over there.
Experts have been studying this kind of thing in terms of how it'll affect deep space exploration, too, and since it factors into the things I write, I've been looking at various things on the subject. (One I recommend, if you're curious: go to Netflix or YouTube, look up an episode of the show
The Universe, titled "Sex in Space".)
The bottom line is, when you take people away from home and put them in a different community, they'll pair up. Many will do so even if they have a loved one at home. It doesn't mean all married people will have an affair under these circumstances, but it increases the likelihood that it'll happen. And -- this is where the weird comparison comes in -- I was talking about this in terms of ANIS, and the show
MASH came to mind, because you had all these characters away from home, in Korea at wartime, constantly exposed to the stresses associated with their circumstances and having varying ways of dealing with it. Many of the married characters had bedwarmers, including Trapper, Frank Burns, and their first CO, Henry Blake. This is not to say that they didn't care about the nurses they were having their affairs with (though Frank was the stereotype of "I promise I'll leave my wife" but never will), and it didn't make them bad people who didn't love their wives any more. It more spoke to the human need for intimacy especially under pressure, and when feeling cut off from support systems back home.
That said, Archer is unmarried, but I thought of this comparison because Blake was the CO on the other show, and being in command of the 4077 did not preclude him from having the same basic needs as the people under him, or from reacting to the pressures he faced on a daily basis by seeking out intimacy.
So the point of my bringing this up (yes, there's a point, I promise

) is to say I think a more realistic approach would have been for Starfleet to have it against the rules, but show it happening any way, and giving us the human drama of why the rules don't work. No matter who you 'ship Jon with, we can all agree that it's unrealistic to assume he wouldn't need someone, or that it wouldn't be bad for him to refrain from acting on it.