Initially, the plague has the exact opposite effect on the people of Eyam. Far from bringing them closer together, it actually drives them apart. The villagers are understandably frightened by what's happening, and this leads them to act selfishly; they refuse to help others for fear of being infected and even accuse other people of witchcraft.
Eventually, attitudes start to change. There's a growing realization among the villagers that they're all in the same boat, and they must all pull together to get through this terrifying ordeal. This sense of growing solidarity finds expression in an oath to which most of the villagers subscribe; they agree to remain in the village until the plague dies out.
For their part, Anna and Elinor extract lead from Merry Wickford's mine in order to protect the young girl's claim. They didn't have to do this, but the plague has made them more socially aware and more understanding of the needs of those around them.
Acts of generosity don't always have such happy consequences, however. Members of the community donate clothes and bedding to their stricken neighbors. Unfortunately, these generous donations are often contaminated with the plague, and therefore spread the disease.