I know it has the word wife in it, but originially in older english wife didn;t mean you had to be married to someone, in dutch we still have the word wijf, but that too has changed meaning over time, it is not simply woman anymore but more like a swearword you would only say that to/about a female you hate.
We use the word housewoman (translated) and they do not need to be married.
The modern sense of "female spouse" began as a specialized sense in Old English; the general sense of "woman" is preserved in midwife, old wives' tale, etc. Middle English sense of "mistress of a household" survives in housewife
So the wife in housewife means woman in english aswell and not the modern wife (that does not mean I know how it is used though, people could still maybe only use it for married women)