At times scriptures talk in symbolism. However, on a closer look they mostly resolve to the truths of basic nature like being righteous (Dharma) and doing one’s duties whole heartedly (Karma).
Here are two verses from Valmiki Ramayana, Ayodhyakanda, Sarga 39. These are beautiful words of advice from grieving Kausalya, Sita’s mother in law to Sita, who has decided to give up life of a princess and go to forest with Rama.
साध्वीनां हि स्थितानां तु शीले सत्ये श्रुते शमे।
स्त्रीणां पवित्रं परमं पतिरेको विशिष्यते।।2.39.24।।
But for those virtuous women whose minds are fixed in chastity, truth,
scriptures and stability, the husband occupies a distinguished place
and is considered supremely holy.
स त्वया नावमन्तव्यः पुत्रः प्रव्राजितो मम।
तव दैवतमस्त्वेष निर्धनः सधनोऽपि वा।।2.39.25।।
You must not underestimate my son in his exile. You must treat him as
your god whether he is wealthy or not.
What does that mean for a wife?
For a woman who has a virtuous husband, treating him like a god is her Dharma. Having fulfilled her duties towards her husband (and family) will entitle her to same reward as worshipping the Supreme Soul and thus she is worthy of attaining ‘Moksha’
Reference:
https://www.valmiki.iitk.ac.in/