NOTE: all algae are not saprophytes.
Saprophyte is a plant that feeds on the organic matter of dead organisms or on the excrement of living organisms. Their type of feeding places saprophytes in the group of heterotrophic organisms. ... A number of photosynthesizing organisms, such as some green algae, may also feed saprophytically.
The reason is that algae are small organisms. Consider a large plant. They can directly pull minerals and water from the soil, and can create food by photosynthesis.
But, for a small algae, growing on rocks, it is not always possible to derive all nutrients from the substrate ( rock, soil, wood etc ) alone. This is because algae have small roots, and are primitive , not well developed like plants. So, they derive some nutrients from dead and decaying matter, making them saprophytes.
Example: A green algae, growing on calcium rich rock (substrate) might absorb nutrients from nearby rotting plant.
Again, please remember that algae are primarily photosynthetic. It is in some cases that they are saprophytes too.