Slime protects against radiation, so cells that depend on photosynthesis in very shallow water are less exposed to harm from UV radiation. Gas diffusion is perhaps 10,000 times slower through slime than through water, so it is easier for a slimy bacterium to survive periods of fluctuation in external chemistry. Gas bubbles can be trapped in slime and used for good adaptive reasons, as in stromatolites. On a higher level, slime helps to form complex structures. Bacterial cells can divide inside their slime coat, so microcolonies and then large colonies form as increasingly large units, well glued together.
Slime helps to trap sediment and nutrients.
Stable communities of bacteria can resist chemical, physical, or pharmacological disturbance, whether they form photosynthetic mats on the shoreline of salty lagoons or masses of plaque on teeth. Sometimes bacteria of different kinds are attracted to one another to form a consortium inside a common slime coat. Different bacteria can act efficiently together. For example, one species will break down organic molecules, releasing hydrogen to methanogenic archaebacteria, which use the hydrogen to produce methane. Consortia of bacteria help to digest food in the stomachs of ruminants and help to form stromatolites.