Another thing to consider: we often forget about this, given how awkward it turned out to be in retrospect, but in the OT (or at least for most of the OT), Luke Skywalker is implied to have a romantic interest in Leia. In A New Hope, Luke thinks she’s beautiful and she is part of Luke’s entire reason for following Obi Wan on the adventure. Towards the end of the movie, an implied love triangle emerges between Han, Luke and Leia. In Empire Strikes Back, Luke seemingly is still attracted to Leia, although his attraction is serendipitously downplayed in the actual film compared to what happens in earlier drafts. (In Brackett’s first draft, it’s implied that a major reason for Luke wanting to be a Jedi is to impress Leia and compete with Han.)
So how do they resolve the love triangle? One easy way would be to just have Yoda straight up tell Luke: “Forget about Leia. It’s not happening. Jedi can’t have romantic attachments, because it just makes it easier to fall to the Dark Side.” But that’s not what happens. Yoda never says anything about Luke’s feelings for Leia (apart from the more generic concern expressed by Yoda that Luke not abandon his training to help his friends). Instead, the love triangle is eventually resolved when we discover Leia is Luke’s sister. This is yet more evidence that the “no romantic attachment” rule was never even considered as a possible idea when the OT was written.
One last thought: it’s interesting that Return of the Jedi decided to keep the imagery of the implied romance between Luke and Leia. Luke and Leia swing together on a rope off Jabba’s sail barge, Leia dressed in a sexy golden bikini in the arms of a confident, mature Luke - implying a swashbuckling romance between the two of them. All that sexual imagery is of course defused once we discover they’re brother and sister, but it’s weird that it’s still in the movie. (More evidence of how late an addition the whole Leia=sister idea probably was.)