Why did the U.S. create welfare programs?
They were aimed at relieving poverty
In the aftermath of WWII, state intervention in the economy became trendy, it was conveyed by Keynesianism. In the US it was introduced by Kennedy and his project of the "last frontier", he created the food stamps, it was followed by Johnson's Great Society which had a similar goal i.e to struggle against poverty.
The welfare programs started out to help those who could not work. This began back in the 1800's. at the state and local level. The first federal welfare program was instituted in 1862 to help injured soldiers and their families. The goal of early welfare programs was to help the widows and orphans.
The modern welfare programs started with FDR. The CCC provided work for the unemployed. The Social Security Act of 1936 was designed to create a safety net for those who could no longer work, due to age or injury. What is now the Aid to Dependent Children act was passed in 1939.
The earliest welfare programs were created to help those who were in poverty due to the inability to work or those like widows or children. The modern welfare programs are designed to help anyone who is deemed to be in poverty.