Like the beak in general in birds have many other functions, so they use it for display, nest construction, singing, thermoregulation in some cases like toucans or like hornbills ...
And the thing that was keeping them underground and keeping it from being released out into the atmosphere was that deep underground, underneath all the adorable sloths and toucans of Costa Rica, were chemolithoautotrophs.