The family should live in such a way that its members learn to care and take responsibility for the young, the old, the sick, the handicapped, and the poor. There are many families who are at times incapable of providing this help. It devolves then on other persons, other families, and, in a subsidiary way, society to provide for their needs: "Religion that is pure and undefiled before God and the Father is this: to visit orphans and widows in their affliction and to keep oneself unstained from the world" (Jas 1:27). CCC 2208
Society, while respecting the principle of subsidiarity, has the duty to support and strengthen marriage and the family. Public authority must respect, protect, and foster the true nature of marriage and the family, public morality, the rights of parents, and domestic prosperity. (#458)
The Catechism Companion Vol III has some good commentary on this:
A steady family environment is crucial for personal growth. When you have a good, solid home, you have a foundation for avoiding enslavement and being safe. Families play a significant role in teaching right and wrong and faith. Living in a family prepares us to live the larger community... Communities are composed of persons. And those persons have immortal souls. They will live forever, reunited with their bodies someday, either in glory or in damnation. Treating people with dignity is vital for individuals and societies alike. They are human beings. They have a mom and dad. They have been willed into existence by God. (p. 88)