corals and algae compete for nutrients light and space. In a fish only tank there is nothing to compete with the algae for nutrients, light and space. On the other you don't need space (rock etc) as much light and you can be much more aggressive killing it.
Read some of
@Paul B 's threads and his comments on algae. If I can paraphrase, it's part of the cycle. As the tank matures and corals and algae eating inverts and fish are added the algae recedes. It will always be there and it doesn't bother the fish.
I think as we see pictures of mature tanks packed with forests of corals we don't see the journey of work, set backs and trials and errors to get to that point. Someone recently posted that tank cycle and tank maturity are 2 different things.
Those tanks in the pics usually have an army of inverts and tangs that pic at algae all day keeping it at bay while the corals take up space, light and nutrients.