Yeah, when I first saw a clip of that I thought it was pretty bad too, but in the context of the episode a character is entering a training simulator where the crew has been striken with a virus that removes people's inhibitions similar to the TOS episode
The Naked Time. LD is a comedy so they tried to make a joke out of no inhibitions = giant orgy, plus I assume the fact that everyone gets naked is a play on the original episode's title. I'm not going to argue it's great writing, or that there wasn't someone working in production beating off to it, but it is 100% consistent with Star Trek lore.
*Edit* I also completely forgot about the TNG episode where they find a bunch of people who literally died having an orgy when they were infected with a similar virus. You can say it's low-brow and not funny, but you can't say it's not totally consistant with previous Star Trek series:
View attachment 2807852
I turned around on LD when they went on the collector's ship and the skeleton of the giant Spock clone from TAS was hanging from the ceiling. That's a deep cut right there. Their references to previous stuff are on point even if the characters are terrible. I have to give credit where it's due.