It also increases water volume for better stability, and gives a nice easy place to keep a deep sand bed, where it can easily be replaced down the road, when it gets "full".
The algae use up nitrates, phosphates and other nutrients that are detrimental to coral growth. In my opinion that's the most important role.