As far as I understand, cyanobacteria began performing photosynthesis long before plant cells as we know them arrived on the scene. But cyanobacteria do not seem to use polysaccharides in the same way as plant cells do (building materials, for example). So what evolutionary benefit did cyanobacteria gain from photosynthesis, that could have made them continue to produce oxygen generation after generation?