Lets say it's a modern society like ours. It is statistically very probable that a kid is going to survive well into adult-hood. It's also easy to biologically produce children, so easy so that it just sometimes happens by accident. However it takes a rediculously huge resource investment to bring a kid into being a fully functional and contributing adult, and that cost increases the older the kid gets, until they become self sufficient [starting at school, which is logistically complex, on to buying the kid a first car, on to supporting them through college, etc]. If you identify an early sign that indicates to you that this kid is going to be a dud, such as evidence of temper problems or psychological problems or learning disabilities or whatever, or you just goofed them up because you were a new parent and made some big mistakes, then cut your loss before the as-yet-inexpensive lame kid becomes a super-expensive lame adult. It's easy enough to pop another kid out. It's super difficult however to put a kid through medical school. Consider that your trial-kid to ready you for the real thing on the next go around.
I don't thing this is all that accurate, economically. For pregnant females and involved partners there's quite a bit of investment before a child is even born, and a pregnancy takes most of a year to carry out then at least another year to recover from enough that the body is ready to start another pregnancy. There may also be a big cost for a man who wants a child to convince a woman to bear him one, whether by hiring a surrogate or romancing a mate. For women fertility basically ends at age 40, and for both men and women the older you are the more difficult it is to take care of a needy baby or an energetic child; people tend to accumulate medical conditions that can interfere with conception as they get older too. On the other hand, parents (in the US) have no legal responsibility to provide a car, tuition, or anything to a child over 18. In this hypothetical world a child as young as 14 or maybe even 12 might survive on its own, so the costs of 'producing' a child might be considered to end sooner than you are estimating.
Let's consider me - I love children, I'm 33, I'd really like to have 2 or 3 kids before I'm too old to do so. I'm single, but theoretically I could just find a sperm donor, even if that's not what I'd ideally like to do. I have type 2 diabetes, which automatically makes any pregnancy a high-risk pregnancy, but with good medical care it's not a big risk. But medical care is expensive, raising a baby as a single parent is even more expensive, and for years I've made the depressing choice to not attempt to have a child because I simply couldn't afford to take care of it. That's an ethical judgment based on my estimation of what the quality of life would be for the child and me if I had one in my current economic circumstances. There was also a magazine article in Time just recently explaining how many people are choosing to never have children, and one of the major reasons for making this choice is the extremely high costs of raising a child, which people are considering to be not worth the quality of life decrease from sacrificing that amount of money, as well as parenting time and effort.
So, even a young child represents a huge amount of sunk costs. And even if a parent decided they didn't want their child (and the other parent, or the parent's parents, didn't want it either), that child would likely be valuable to someone else, so the parent would be way farther ahead to try to sell the child. Even giving it away would be a free shot at grandchildren compared to killing it, which doesn't seem beneficial in any way.
There is actually a science fiction novel where a human woman is turned into a member of an amphibian race which produce vast number of tadpoles and eat them as their main meat source, because they have a strict 1 parent - 1 child restriction on how many tadpoles are allowed to survive to grow up. That was not the most squicky thing I've ever seen, not as gross as if the babies had been humanoid, but it certainly seemed tragic and rather gross.
This is actually a really interesting point, and kind of one of the topics I was hoping to expore. It revolted you a bit in the story, but you identified it as something that you would find much more revolting if it were human instead of the amphibian race. Why do you think this is? How was this different for you?
Well, humans have all sort of instincts about what's gross and what is boring and what's desirable. Many humans instinctively feel affectionate toward and protective of things that trigger our "baby" pattern recognition instincts, even if those objects are actually inanimate teddy bears or dolls, or babies of another species like kittens and puppies. We even favor cars which give the impression of having a facial expression we like. Similarly, breast and buttock shapes which trigger our "yummy" pattern recognition are effective even when these curved shapes are part of a peach or plum, or an abstract heart-shape.
Tadpoles on the other hand aren't cute, they don't trigger our "baby" pattern recognition. The repulsion is intellectual but not visceral. This is the same as the idea of eating whales or octopi - they are quite intelligent, I personally think it is tragic to eat intelligent animals, but they aren't cute so we have no visceral aversion to eating them. (Although octopi may trigger a different pattern recognition instinct which inhibits people from eating them, the one for "disgusting" animals such as spiders, worms, snakes, centipedes/milipedes, and various grubs and maggots.)