It is very difficult to say why any poet writes any single poem. However, we can point out some biographical and artistic factors that give us some of the reasons.
First, the poem was dedicated to Mark Strand, a friend of Justice; Strand often wrote about death.
Second, the poem was written in the 1960s, when the images from the Vietnam War were flooding America, and everyone was aware of the possibility of violent death.
Third, he wrote this poem as he hit middle age, and a lot of his poems addressed death and mortality during this period.