Let's look at the text of the poem specifically. First, the poem begins the longing to have a relationship of true love. This obviously contrasts the relationship that he and his wife have together. Likewise, the women have just been talking about how relationships with their own husbands are fleeting. If their husbands die they can just get new ones.
Secondly, the land of dreams that the poem describes is actually their reality:
To lie before us like a land of dreams,
So various, so beautiful, so new.
Hath really neither joy, nor love, nor light,
Nor certitude, nor peace, nor help for pain;
And we are here as on a darkling plain
Swept with confused alarms of struggle and flight,
Where ignorant armies clash by night.
These women are the the IGNORANT ARMIES. They don't have real peace or joy or help for their pain.
This poem is used because it is ironic to their living situation.