If they truly were righteous, how could they even think this way. Am I missing something?
Barbaric as it sounds by our lofty modern-day standards, VioletAnai, the girls were doing what they had to. Coarse as it sounds, what else can be said? There were no men available to provide offspring to allow the nation to survive, as you subsequently pointed out. Indeed, "desperate times call for desperate measures" according to the old cliche. ;-)
At the risk of sounding crude, the girls were desperate, and most likely uncomfortable in knowing they might be "raping" their dear old dad. But they made the sacrifice of getting him drunk and then getting him to have sex with them for a very good reason. Not getting into that reason (this would require an exhaustive discussion of the surrounding scriptures), suffice it to say their intentions were purely to have offspring for future generations. Therefore, the girls were not evil as were those destroyed in the cities of Sodom and Gomorrah to answer your concern there.
What about the age old excuse for pologamy and incest in the ancient world: The nation had to survive, so therefore, it was allowed.
There you go. You superficially answered your own question of "why?" and scratched the surface of a deep subject. Not the answer one wants to hear, but it touches upon a pragmatic and reality-based reason. Obviously there's a lot more historical breadth there, if you're willing to dig down far enough to find it. The reasons for these girls actions are based upon the times they lived in, the level of their moral and spiritual awareness (as opposed to modern-times where we are far more advanced in these areas), everything was different back then.
In closing, one really appreciates the patience and loving-kindness of Jehovah over his people in the dark ages of human history, when reading these accounts and observing Jehovah's actions in response.
Derrick
To see a World in a Grain of Sand
And a Heaven in a Wild Flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
-- William Blake (Auguries of Innocence)