As an aside, may I say that this subject has long been of interest to me. If I knew how to pitch such a project, I would love to do a PBS-type documentary covering all the ways in which the elites of Hollywood and New York incorporated subtle (and not so subtle) plot devices into the entertainments of that time to promote the an anti-prejudice and pro-civil-rights message. Part of this dynamic was purely commercial; there is no doubt that music arising from African-America culture was very popular among teenagers and young adults of the post-WWII generation; this gave rise to the whole Rock-and-Roll phenomonon (nothing novel about that insight, I know).
Anyway, even with that, I think one of the things that made the shows of Rogers and Hammerstein so timeless was that they expressed fundamental truths of human nature. The song you reference is one example of that.
(steely)
Interestingly, Nellie is able to overcome her problem and goes back for Emile, because after all, he's a Frechman and that's okay (at least, it was then). The Lt. falls in love with Liat and cannot live without her and winds up not living with her, either. A point is a point and the point was made, but money is money and R&H knew their audience. Having a US Naval officer marry a Polynesian would not have gone over with American audiences at the time. (Fooling around with her, sure, all the GIs were doing it, weren't they?)
TS
(that last line was a joke)