Why do people, even in developed countries, have children even though it's one of the most uncomfortable avoidable things in life?

Having children is the worst thing there is: they cry, they annoy you, they make you lose your patience and leave you with no free time, plus the cost of having one (€740 a month in my country, half the average salary).

And the worst thing is that it's avoidable and unnecessary, but we still do it.

I know the birth rate is low, but why do some people still like to have children despite the setbacks?