My title question is rubbish, but I'm sorry, I can't think of better phrasing. This is not a historical hypothetical.
One of the things I was taught at school was that when the men went off to war during WWII, the women took their jobs in factories, etc. This, I was told, led to a situation post WWII where women remained in workplace and were viewed as an asset.
My question is based around this. Historically, women would had to do that same "men's work" when the men were off at war. History is replete with wars. Why did the outcome of women remaining in the workplace never materialise until WWII? In other words, what pushed women back into the homemaker role once the men returned from war?
I wrote an answer not long ago on a similar subject, and I'll quote from that first:
This is a difficult topic to write about, because it's so easy to slide into caricature and stereotype. For the most part, women who'd been doing skilled manual labor during the war left their jobs to live a more domestic existence, or at least took jobs that were seen as more suitable for women once men had returned - Rosie the Riveter became June Cleaver. Where this becomes difficult is that the popular story at the time was "the women were so helpful to come out and pitch in for the war effort, but now they're all happy to leave that behind and make ambrosia salad for the neighborhood barbeque," and the popular narrative now is "women relished the chance to work for their own wage, but they were forced into a narrow, uncomfortable box of femininity once the war was done, and the feminist movement was a direct response to that," and these are both far too simple.
So, let's start with married women joining the workforce during World War II. It has to be remembered that women were working before the war: poor women often did paid work of some kind whether or not they had children (e.g. domestic service, skilled factory work in the garment industry, less skilled factory work in other fields, waitressing, laundries), single middle-class women who were waiting to get married or who never married usually self-supported or brought some money back to their parents (white-collar office work, dressmaking, behind the counter in a store, millinery or dressmaking, teaching), and women whose husbands owned retail locations often became involved with them, sometimes behind the counter, sometimes in their own ancillary department or related business. The change that happened during WWII was that the government actively solicited women who otherwise would be seen as "needed at home" or "too refined to work" to fill the gap left by men who'd enlisted for the duration of the war, and encouraged managers to. About 6.5 million women joined the workforce in the early years of the war in response, not just in munitions manufacturing (as the stereotype goes), but in offices and shops, and in support roles in the military; working married women outnumbered working single ones by 1944. Almost immediately following the end of the war, they were dropped flat: 4.6 of the 6.5 million women mentioned before were gone by February 1946 - but contrary to the stereotype that all were forced to become housewives, by 1947 there were again more married women than single ones in the workforce (first older housewives with little work experience, and then younger mothers who left their children with sitters), and that would keep on. A certain barrier had broken down, and would not be put back even though some women didn't want to keep working.
The ideal of a marriage where the husband went out into the world while the wife stayed at home was much older than this time period, as was the assumption that everyone wanted to get married if at all economically possible - but despite the declining position of the housewife over the early twentieth century, this ideal strengthened at the same time, with more people focused on marriage earlier in life. The average age at first marriage in America dropped over the first half of the twentieth century: it was 26.1 for men and 22 for women in 1890s, 25.1/21.6 in 1910, 24.3/21.3 in 1930, shot up during the Depression - 26.7/23.3 in 1939 - and plummeted to 22.6/20.4 in 1951. The marriage rate had followed that, dropping during the Depression and popping up after the war. From Front Porch to Back Seat: Courtship in Twentieth-Century America has an interesting analysis of winners of the Radcliffe College yearly song competition which illustrates the way that these ideas were internalized continuously by young women. In the 1910s and 1920s, the songs focused on the women themselves and their quest for knowledge; in the 1930s, they celebrate daring youth; by 1948, becoming a wife and mother was the main focus of the winning song. (Later ones particularly celebrated Harvard men, of course.) Parents endorsed early marriage and magazines urged them to provide the necessary financial support, while psychiatrists suggested that 19 and 20 were ideal ages to get married to encourage maturity and prevent psychological trauma. So while the actions of the employers in pushing women out of the workforce were instrumental in creating the postwar domestic situation, many women actively bought into the notion that war work should be a temporary hiatus from the preferred domestic arrangement.
Now, moving on from the previous answer. This did occur before World War II - women's serious entry into the clerical profession was when they were brought in to replace men who'd gone to the front during World War I, and unlike the women who who went into manufacturing during both wars, they stayed in these jobs after the war. Working-class women with a little extra training or schooling entered it in greater numbers, as they could earn much more than in factories, domestic service, or piecework at home. (Still not as much as men in similar skilled positions, but in some cases as much as men in the equivalent of the previous, which was nothing to sneeze at.) In part, this was a result of gradual changes from before the war that were in the process of turning the field "pink collar" (associated largely with women) - women were cheap labor and seen as inherently neat and precise but not original or able to make important decisions, the office appeared to be a clean and safe place, typewriters were considered analogous to the piano - but it was a process that was accelerated by the increased numbers of women pushed into men's clerical jobs.
Even though this mirrors the situation after World War II, it does not get much attention for a couple of reasons. WWII is a more popular topic than WWI, we have more media about it, and we have mascots like Rosie the Riveter that help to popularize narratives about women working on the home front. Narratives about WWI, by contrast, mainly focus on the men in the trenches, "lions led by donkeys"; the movies about it are more indie. There is an awareness of women having worked outside the home in WWI, but the mainstream narrative relating to that is generally that the newfound freedom resulted in the flapper (which is not really true, but that's another story), and nobody seems to question why one wartime work experience would lead to societal liberation and another a generation later to repression. In both cases, women's employment peaked sharply during the war and went back down to where it had been before it, but there was a much longer timeline starting decades earlier that saw gradually increasing opportunities for women outside the home and gradually increasing acceptance for middle-class and married women working.
Edit: Just now I see that I have a better answer to this here - Why is WW2 considered to be a major catalyst in the advancement of women in America when they had been a large part of the workforce since factories became mainstream?. Ah well.