The shelter provided by the reef allows smaller fish to hide from predators, while larger predators use the reef as a hunting ground