Retirement as a common practice is a relatively modern concept, borne out of the industrial revolution and extended lifespans.
In traditional societies, the treatment of the elderly varies a lot. The anthropologist Jared Diamond discusses this in his book The World Until Yesterday, and in talks. It can range from neglect, suicide or outright murder (see The Ballad of Narayama), to reverence and valued members of the tribe. Many elders remained productive and valuable as repositories of wisdom:
First, as regards usefulness, older people continue to perform useful services. One use of older people in traditional societies is that they often are still effective at producing food. Another traditional usefulness of older people is that they are capable of babysitting their grandchildren, thereby freeing up their own adult children, the parents of those grandchildren, to go hunting and gathering food for the grandchildren. Still another traditional value of older people is in making tools, weapons, baskets, pots and textiles. In fact, they're usually the people who are best at it. Older people usually are the leaders of traditional societies, and the people most knowledgeable about politics, medicine, religion, songs and dances.