Many poets compose poetry in order to get the reader to consider certain things. These considerations will typically parallel the theme of the poem (the message of the poem according to the reoccurring ideas).
In regards to Rudyard Kipling's poem "If," one may come tho believe that the poem is meant to force the reader to take a look inward. The poem speaks to manhood and leadership, righteous and unrighteous living, and the importance of a strong work ethic.
While no one ever really knows why an author writes a poem (unless the question has been answered and asked directly of the poet), the reason why a poem exists is laid at the feet of the reader alone.
Therefore, the reason the poem exists is for the individual reader to consider. For some, the poem may be a reminder of how to live life correctly. For others, the poem may represent the voids in life and the mistakes made. Others still may believe that the poem serves as an instruction guide, provided by Kipling, in hopes that mankind will make the changes in life he deems important.