Nearly all algae have photosynthetic machinery ultimately derived from the cyanobacteria , and so produce oxygen as a by-product of photosynthesis , unlike other photosynthetic bacteria such as purple and green bacteria . Nearly all algae have photosynthetic machinery ultimately derived from the Cyanobacteria , and so produce oxygen as a by-product of photosynthesis , unlike other photosynthetic bacteria such as purple and green sulfur bacteria .