Motility allows microorganisms to navigate towards nutrient-rich environments, escape from harmful conditions, or move towards host cells during infections.