The primary purpose of environmental sanitation is to protect public health. By keeping our surroundings clean, we can prevent the spread of diseases. For example, if garbage is lying around, it can attract flies and other insects that transmit diseases.