if you have children, they will remember of you, of course, and your grand-children also, and your grand-grand children, but after 100 generations, 300 or 400 centuries, who will remember personally of you ?
If you become famous for many reasons (politics, writings, arts, or great or horrible deeds) if you stay in human's history people will remember you for a longer time. But after how many thousands or years the earth and humanity will disappear with all memories ? who knows ?
If after you die you pass in another world, you might care of your legacy – or perhaps not at all, especially if you are reincarnating or life by a entirely different kind of 'being'.
Or perhaps there is nothing after death and then you won't care of anything because your 'I' has stopped to be. As if it never had a 'I' for you.
in fact the issue is the sense of life for a mortal creature : why we are born if we are doomed to die ? Should we live for something or someone or just care about having fun ? Most of humans need spirituality (even without religion) and hope to not completely be dissolved. At the contrary some atheists prefer to disappear entirely instead of being judged by a grumpy God who keep the account of all our so called 'sins'
For some people having children a legacy is a way to calm themselves when they think of their own death, or they need to give love (or by a vital instinct). For others, that thirst of immortality/spirituality and sense of life does not need children, so they have not or if they have it is for another reason (partner's will, love of a little one, etc.).
There are more futile and selfish reasons to have children ( social status, economical motives, etc.), but let them apart.
it is not more selfish to have a child than to have not one. That is equal. Both decide what is good for themselves. But is someone has a child for 'bad reasons' or carelessly, of course it has more serious consequences than if someone has not. That's a burden, even if you love your sons or daughters.
So I think that if one has not a real and serious desire to have children and is not ready to the sacrifice of its freedom or/career/ ambitions or the way of life one enjoys, better to have not. In Western societies, we have choice, so we can take our responsibilities.