The United States in the 1700's was predominately comprised of young people for a variety of reasons. Life expectancies were much shorter than they are today, primarily because so many people died in infancy or childhood. That meant that a relatively small percentage of the population lived to old age.
Other that the Native Americans, the country was populated almost entirely by immigrants, many of whom came came from England or other parts of Europe. Getting here required an extremely hazardous ocean voyage, and life on the new continent was equally difficult. The immigrants who came here voluntarily were either fleeing from persecution or were poor and hoping for a better life in the new world, the only reasons they would take such a risk. Few people who were old or ill would have attempted such a trip, and many of those who did probably died in the process. The slave population was also young. Slave-traders were not going to waste their time bringing over those who were old or ill, and relatively few slaves survived long enough in the harsh conditions most of them endured to live to old age.
In the early years of this country, few people lived to old age, but for those that did, "old-age security" meant having children or property. Having family living nearby wasn't often an issue. In those days before railroads and automobiles, families were large and few children ventured far from home.
Before 1800, less than 5% of the U.S. population lived in cities. Everyone else resided in rural areas where extended families could live together easily and cheaply. Generally, people worked for themselves. As a 1937 Social Security pamphlet described it, "The home of a pioneer family was a little world in itself. Members of the family were their own farm and factory workers, butchers, bakers, and barbers; policemen and firemen; often their own doctors and nurses, and sometimes their own teachers as well." (Social Security, 1937) You didn't need cash to survive in that economy, and families were fairly self-sufficient.
Having a family was the key to survival. As later described in that Social Security pamphlet,
"A young man then could hardly afford not to marry. He needed a wife as a business partner, children as helpers. In early New England not only spinsters but bachelors were under a cloud. Bachelors, in fact, were regarded with suspicion. Usually they had to live where the court told them to. Single people had to attach themselves to a family to get a chance to work for their living. Both the children and the old people earned their place at the family table." (Social Security, 1937)
Children were expected to split their earnings with, or otherwise provide for, their parents. If a parent needed care, the children were expected to provide it. Elderly people in need of care who were childless but wealthy could hire whatever help they needed. Dependent elderly people who could not be cared for by their own families could be 'boarded out' with surrogate families, and the adult children paid for the cost of that care. Those elderly who were poor and childless, or whose children refused or were unable to care for them, ended up dependent on charity or public welfare.
Slaves, of course, had neither families nor property. Their families were often split up, so it would have been impossible for children to look after their own parents. The quality of their life in old age was completely dependent on the master they worked for.
The public welfare system in the 18th and 19th centuries was a local, not a federal, obligation, patterned on the English "Poor Laws". The Poor Laws established the government's responsibility to provide for those who could not care for themselves, but left the details about how to do it up to the local town or county officials.
Initially, "paupers" were given cash payments called "outdoor relief", which was paid for by the taxpayers of the city or county. As the cost of outdoor relief increased, governments decided to create a more cost-effective system, called "indoor relief". They built poorhouses, almshouses, poor farms, county infirmaries, asylums, or county homes to house people who were too expensive to support with outside relief, and required welfare recipients to go to these facilities if they wanted assistance. In some states, the state owned and operated some or all of the poorhouses, in others, counties or cities ran them. A few states avoided the cost of building and maintaining poorhouses by boarding paupers out, sometimes with their own relatives, or paying farmers to care for them. Tennessee actually auctioned their paupers off to the lowest bidder. (The Atlantic Monthly, 1881)
A common concern of the public at that time was that the opportunity to get free room and board would be so attractive that people would deliberately pretend to be poor so they could live an "indolent life" in the almshouse at the expense of the taxpayers. Consequently, poorhouse life was made as unappealing as possible. The "inmates" were expected to wear a poorhouse uniform rather than their own clothes, and they were not allowed to leave the poorhouse. Many of the poorhouses had attached farms so they could produce their own food and be self-sufficient, and they were often located far out in the country to keep them out of sight. To offset the cost of care, the inmates were expected to do the work needed to keep the operation going. Even the older women were given jobs like sewing.
Operators also were careful to check before accepting someone into the poorhouse to see if anyone else could be supporting the potential inmate. If a poorhouse applicant had adult children, he might have to prove that his children were unable or unwilling to support him before he would be accepted. The local government was only responsible for people from their jurisdiction, so they could, for instance, refuse entry to a widow who grew up somewhere else. Someone who had lived in several places might find that none of them considered him or her eligible for taxpayer support. This happened often enough that there were bands of poor homeless people who roamed from place to place, staying in each one only until the authorities ordered them to move on.
Concerns about the high cost of operating the poorhouses lead to other indignities. For instance, New Jersey law included a provision forbidding emancipation of slaves who were 40 years old or more "for fear of the distant contingency, that this freedman might become a public burthen to the township, by being a pauper in his old age, and rather than subject the towns to that they preferred to let the man and his posterity remain in slavery." (Library of Congress: Slaves and the Courts, 1740-1860)
As time passed, the poorhouses became catch-alls for anyone who couldn't survive in the outside world, and they became home to poor dependent elderly people, where they lived in the same rooms with "miscreants" (petty criminals), "inebriates" and "intemperates" (alcoholics), orphans, unwed mothers, and the "feeble-minded" (mentally ill).
One alternative to sending people to the poorhouses was to make cash payments to specific groups of disabled or indigent people to help them support themselves in their own homes. For many years, the only group eligible for federal cash benefits of any kind were veterans and their families. Although these payments were often called "pensions", many were dependent on the disability and/or indigence of the recipients, so some of them took on aspects of welfare payments.
One of the first acts of the new government in 1776 was to authorize pensions for disabled Revolutionary War veterans. The initial military pension law offered half-pay for the rest of their lives to soldiers who were so disabled in the war that they were unable to work for a living. The federal government and the states disagreed about who should pay for and administer the program. The federal government didn't have the authority to raise funds by taxation at that time, so they said that the pensions were to be administered and paid for by the states. The states didn't want to bear the cost and they refused to do anything, so the federal government took back responsibility. However, the newly-formed government hadn't yet created any organized system for accepting and paying pension claims. For several years, a separate act of Congress had to be voted on to appropriate funds for each individual that requested a pension, until, finally, a general appropriation was made in 1790, and a pension law was enacted in 1792.
The rules for veterans pensions were changed numerous times in the next few years. Gradually, veterans benefits were expanded to include pension payments even for those who were not disabled, if they served during certain wars and time periods -- first for officers, then, several years later, for enlisted men.
Benefits for veterans' surviving spouses came later, and most were limited to spouses who were indigent. In 1780, the first benefit for surviving spouses was created for widows of officers who died in the Revolutionary War. In subsequent years, the law was changed include officers who died in service after the War, and to their children under age 16, if their mother was deceased. Eventually, when the government needed incentives to get men to fight in the War of 1812, benefits for widows and children were made available to enlisted men as well as officers.