It is common for poets and writers to use metaphors and symbols to convey their ideas and emotions. The metaphor of the world as a stage has been used by many poets and writers to convey the idea that life is like a play, with each person playing a role and the world itself being a kind of stage.
The metaphor suggests that life is temporary and fleeting and that we are all just passing through, playing our parts, and then eventually departing. It also suggests that the world is a place of drama and conflict, where people are constantly interacting and performing for each other.
By comparing the world to a stage, the poet may be trying to convey a sense of the impermanence and illusion of life or to comment on the role that people play in the world and how they are perceived by others. The specific reasons why the poet chose to use this metaphor will depend on the context and the intended message of the poem.