The Enterprise D was the Federation flagship, built in the pre-Borg era where the Romulans were MIA, the Klingons were allies, and the Cardassians were only a moderate threat. It had 1000 people on board and was captained by a diplomat. It was a ship of peace, in a mostly peaceful galaxy. Families on-board, though deemed a questionable policy by many, worked.
The Voyager was a deep space exploration vessel, crewed by 140 people and captained by a scientist. It was built in an era where the Borg were known to exist, and the Dominion newly discovered. It was fine that it was intended to operate without families. Naomi's presence was accidental, not intended.
Regardless, the EMH would have been aware of normal family dynamics, due to both exposure to the crew and his pediatrics/child psychology programs. So creating a holographic family worked for him. If holodecks existed, a great many lonely humans might create them as well. They might make "lollipops", or go for more realism... but it would occur.
The Voyager was a deep space exploration vessel, crewed by 140 people and captained by a scientist. It was built in an era where the Borg were known to exist, and the Dominion newly discovered. It was fine that it was intended to operate without families. Naomi's presence was accidental, not intended.
Regardless, the EMH would have been aware of normal family dynamics, due to both exposure to the crew and his pediatrics/child psychology programs. So creating a holographic family worked for him. If holodecks existed, a great many lonely humans might create them as well. They might make "lollipops", or go for more realism... but it would occur.