Specifically, I understand a 1968 law put into effect the Man in the House rule. Black families had to decide if welfare would pay better than the father's job. Many left the house so the mother and child(ren) could receive the welfare payment. The Moe Factz podcast has been helpful to me in understanding these structural problems in society.
According to your first link, the rule had been in place in some jurisdictions prior to 1968, but was struck down by the US Supreme Court at that time.
To clarify: the Supreme Court did not say that assistance could not be restricted to single parents. The "Man in the House" rule said that a woman was not single if she even had a boyfriend who was not her children's father, if her boyfriend ever visited her house. That's the part that was struck down.
As for the restriction to single parents, I can certainly see the potential for unintended consequences. Paying people not to get married means fewer people will get married — just as paying people not to work, as the "welfare cliff" effectively does, means fewer people will work. I broadly support the idea of helping people who need help, but it needs to be done in such a way that it doesn't tend to trap them in their situations.
The authors of this regulation probably assumed that married couples would not be induced to split just to collect money, and that single moms would stay chaste in order to collect, and thus not have more out-of-wedlock children. So they set up a law that incentivized behavior they were trying to avoid. It's like the Marriage Penalty ( https://en.wikipedia.org/wiki/Marriage_penalty ) except worse.
So it probably wasn't a result of maliciousness but rather a lack of imagination and empathy (aka stupidity).