The answer has nothing to do with the sea wyvern which may or may not be real. The question is why a population would kill its children. This practice is called infanticide
Mabiki: Infanticide and Population Growth in Eastern Japan, 1660-1950
by Fabian Drixler
Proponents of infanticide also articulated their logic in a number of
widely shared metaphors. The most famous of these, mabiki or
“thinning,” likened infants to rice plants, some of which needed to be
uprooted as seedlings to give their siblings the space and light to
thrive. The metaphor encapsulates two of the fundamental assumptions of
the act it described: that newborn children were not fully formed
humans, and as such were disposable; and that to do right by their
chosen children, responsible parents might need to destroy some
infants at birth.
If you are in an agrarian society like ancient Egypt where more children = more labor = more food, your society will have no tradition of infanticide. But if you are hunter / gatherers, fishermen or otherwise live in a marginal situation as regards food (like far Northern Europe), starvation is a real threat. Human reproductive capacity can easily overwhelm the capacity of a region to sustain the population. If you have no way to practice birth control, then the only way to keep the population in check is to kill some children. Or send your young men out to Viking, or fight, or go somewhere else and not come back.
Which is a hard thing, and so cultural beliefs and rituals come up around the practice to make it more palatable, and make the necessity more obvious for persons who have trouble thinking about the long term and the common good. Or maybe it is luck and evolution: societies that happen into rituals that keep their populations in check do not vanish into famine.
Thus the fish, and the dragon, and the ritual. Maybe the dragon does eat them, or sharks do, or crabs when they drown or freeze. But the reason for the sacrifice has to do with the long term sustainability of this society. The children in these boats do not come back, and they do not swell the population and they do not eat, and the children who are left behind do.