Yes, but their families don't physically go on missions with them, they don't ride in tanks and planes with them.
The intent was that the saucer section would be left behind somewhere safe before the battle section went into combat, as we saw in "The Arsenal of Freedom." (This was later ignored because of the difficulty of working with the 6-foot Enterprise miniature, the only one that could separate.) And it's not as if frontier towns or forts never came under attack. It's not as if cities are never hit by storms or wildfires or earthquakes. There's no place where people's safety is absolutely guaranteed. (I for one have never understood how people are willing to risk having homes and families in a city like San Francisco that's right on top of an active earthquake fault. Having families aboard a starship hardly seems any more dangerous than that.)
What would you think of a mercenary who, say, takes his 8-year-old son into the jungle to fight rebels because otherwise he'd "feel alone"?
That's a straw man. Starfleet crews don't bring their children down on away missions to dangerous planets. They leave them on the ship surrounded by state-of-the-art shields and weapons.