The great MTM in his brilliant couplet may have 'imitated' life condition due to Covid-19 like situation or some man made turmoil in his time.
But the question - how does poetry benefit us, does it have educational value? The ancient philosopher Plato thought it did not. To him poets were not pragmatic and did not promote knowledge of any use. He considered poetry as imaginary literature offering merely lazy entertainment to its readers or mushaira listeners.
In his work 'Republic' which was his doctrines of order and character of just state, he considered poet worthless. They (by and large) are imitator of life but adding nothing to life. Poetry are largely verbal imitation of the condition surrounding the poet. He wanted poets to play positive role in seeking possibility of life with their gifted imagination rather than deserting from it.
Here is the link Plato's objection about poet: https://www.slideshare.net/dilipbarad/platos-objections-to-poetry-and-aristotles=answers