In general though, through the 50s-70s there were some tragic events where people died in fires. Part of this is federal legislation, part of this is California who required household furnishings to withstand an open flame. Most of the legislation still stands, some of it like CA's has been reduced to a smolder test but it still requires some retardants.
People don't pay attention to this one but its in everything, mattresses, couches, baby sleep wear. And for me, a bigger issue than PFAS.
As another commenter stated laws were passed but more so than that the companies who make things were concerned about lawsuits and reputation damage so treating consumer textiles for flame retardants just became standard industry practice.
As an aside, I know a historical reenacter who had a need to make some char-cloth. The only thing he could find that wasn't treated was cotton work gloves.
I was just recently looking at bicycle seats for small kids and the one I found interesting happened to recently have a recall (Thule) as they grossly over applied the flame retardant to a point where it was immediately toxic. I am guessing it was in the foam pieces but such a depressing idea that we need to make outdoor bicycle seats flame retardant.