The
real answer is because it's a family-friendly franchise, with a utopian vision of humanity that doesn't offend the sponsors. I think they do get up to some weird, freaky stuff in the holodeck, but like the toilets, it's one of those facets of Star Trek life that can only exist offscreen.
Why do the holodeck doors[0] look like they have massive locking mechanisms? The holodeck is apparently one of the most advanced pieces of technology in Starfleet, a system of such vast complexity it can be create sentient life on command, and simulate the experience of entire worlds down to the atomic level. Why would such a system have what appears to be a peripheral role on the ship, serving as little more than entertainment, and why is it apparently locked up tighter than even the bridge?
It's implied that humans for the most part have evolved beyond beyond base desires like greed and hatred, but this is rarely backed up by any of the series. But what if, among Federation society, displays of "unevolved" human behavior are generally forbidden or frowned upon outside of a controlled environment like the holodeck?
Whatever happens in the holodeck, stays in the holodeck (except when it doesn't) thoroughly locked away out of sight and out of mind. It acts as a release mechanism for humanity's atavistic pleasure seeking side, but humans can't admit that it plays as central a role in their society as it must. We catch glimpses of this now and then from Barclay, or the one time Geordi's secret hologram girlfriend was discovered by the woman it was based on, but for the most part the humans maintain the pretense that that part of their psyche no longer exists.
Part of the reason for this subterfuge (that I'm concocting and that isn't canon but should be) might be that the Federation was started and run by humans, a species which is, as interstellar societies go, still practically children. Anyone spending time being tutored in civilization by the condescending (per Enterprise) Vulcans, the first alien species Humans encounter and the one that forms, if even subconsciously, their template for what "aliens" actually are, might have developed a deep species-level cultural cringe and a desire to appear more "evolved" to other species.
[0]http://api.ning.com/files/2bmZ7rAoYlF22iZQvOguNf5lHJktmIBVkr...