Children on board a military vessel -- dumbest idea ever.
But that's exactly the point -- it wasn't intended to be a military vessel. Certainly not a combat vessel, anyway. It was meant to be a research vessel capable of defending itself in emergencies. At the time he created TNG, Roddenberry had really embraced the role of a visionary philosopher, and had rather pacifist leanings, or at least a lower opinion of military force than he'd had in the '60s. So he wanted TNG to be a show about explorers and scientists, not soldiers. According to the original writers' bible , Starfleet's philosophy at the time was "Any military operation is automatically a failure," because the policy was to find peaceful solutions to any problem that arose. The whole reason Roddenberry wanted civilians and families aboard the ship was to underline that it was not
a combat vessel in any way.
Again, though, later producers lost sight of this original intention and depicted the ship in a way that was completely at odds with what Roddenberry and his original creative team had intended. They even introduced the enormous continuity error of the Cardassian war, claiming in "The Wounded" that the war had ended something like two years into TNG's run, even though the first couple of seasons portrayed a Starfleet that was emphatically a peacetime institution. ("Conspiracy"'s final log entry has Picard talking about the taking of life as if it's something he's never had to resort to before, and in "Peak Performance" he objects to the war games because, as he explicitly states, he doesn't consider Starfleet to be a military organization. Which is technically a misuse of the word "military," because Starfleet obviously has the structure and organization of a military, but what he meant was that he didn't consider it a combat organization.)