Why is it necessary to prevent and control communicable diseases in a community?