We already know from TOS that Mutlitronic computers are able to develop sapience, with the M-5 computer being specifically designed to “think and reason” like a person, and built around Dr Daystrom’s neural engrams.
However, we also know from Voyager that the holomatrix of their Mk 1 EMH also incorporates Multitronic technology, and from DS9 that it’s also used in mind-reading devices.
Assuming that the EMH is designed to more or less be a standard hologram with some medical knowledge added in, it shouldn’t have come as a surprise that holograms were either sapient themselves, or were capable of developing sapience. It would only be a logical possibility if technology that allowed human-like thought and reasoning into a hologram.
If anything, it is more of a surprise that sapient holograms like the Doctor or Moriarty hadn’t happened earlier.
I’d like to drop TAS’ ‘The Practical Joker’ into the conversation.
The simulators in the Rec Room of the 1701, seem to be a more basic holographic VR along the lines of Discovery’s combat training simulator that we saw Lorca use to put Tyler through his paces as a security officer in season one. Yet, the simulator was able to take control of the ship and advance its own objectives. It’s not as clear that sentience was achieved in The Practical Joker but it’s hard to argue that there’s no self motivation.
What the problematic Rec Room simulator in TAS has in common with the TNG holodecks is that it is integrated with the ship’s main computer. And unlike in Voyager (and Picard season three), TAS’ Rec Room simulator and the early TNG holodecks were fully integrated into and interoperable with the power supply, communications and other core systems.
I think the OP’s point that the integration of multitronic technology with highly advanced simulators may be one necessary element is fair. Combine that with access, integration and interoperability with the full resources of a starship, and it may be enough to argue that Starfleet should have considered the potential for holographic entities to attain some level of sentience.
In “the practical joker”, it wasn’t the rec room itself that took over the ship, but the ship’s computer gaining some form of sapience due to an external entity, or energy field.
It was being controlled by the ship’s computers, not the other way around.