Even with the Enterprise doing more military-like stuff during the series I see no problem with there being civilians and children on the ship. People want to do their job and have their family around, not go on a years-long mission with their family light years away on Earth. What kind of future for humanity is that when you consider the idea that Starfleet was supposed to be so "over staffed" everyone wanted to be an officer because being in Starfleet was the culmination of humanity's goals to explore the galaxy. But to do that you have to give up ever having a life and family? Nuts to that.
Maybe by the 24c people lost the "Think of the children!" mentality and thought brining them along on a decade-long space mission was worth the risk given the odds they were presented with. Which, again, consider that over the course of seven years there were only a handful of time the ship's occupants were under real mortal danger. Civilians and families today live on military bases, in or near countries not entirely friendly to the U.S. and do work for a greater cause either on their own, through an organization or for the military.
Is someone wanting to be a botanist on a starship really that much different than someone who up-roots their entire family to live in a hut in Africa to provide good medical care?
People take risks all of the time with their children either by choice or bu living circumstances. Should people who live in the ghetto not do so with/have children? I mean it's not safe to go out on the streets or to school there.
The "OMG think of the children!" mentality is gone, hell episodes even suggested that the fear, worry and mourning of death itself was gone. People saw bringing their children on the ship as an acceptable risk and a necessary part of wanting both a career in Starfleet and a family.