Because the speaker expresses his relief that the ship has reached its home port at last and describes hearing people cheering. In the final stanza, the speaker juxtaposes his feelings of mourning and pride. And well that's what makes it elegy, because of the mourning. I hope this helps! :) definition for elegy: a mournful, melancholy, or plaintive poem, especially a funeral song or a lament for the dead.
Its Rosa Park and Martin Luther King Jr
What should have been a 10-minute press conference went on interminably.