I'm inclined to agree with the "if families are ok, pets are too". It certainly appears that the nature of the ship's mission factors into that and that in recent years there's been a turn away from allowing families on ship. It might be, however, that they've remained more tolerant of pets to a degree. After all, if your ship is destroyed along with your pet dog, that's your business. Wife and kids too, that's a much bigger issue.
I'd also say that rank and position factors into this as well, along with ship size. I would imagine that on a smaller ship, only senior officers would have the privilege of bringing family or pets onboard, as there's a significant space issue involved. On a larger ship such as the Ent-D we certainly see more junior officers with families, but even there I have to assume that most of the enlisted don't have that privilege.