Physical conflict is the easiest type of conflict to write, especially for a video game. So, that's why everybody is at war with everybody else in this game, and every mission is "oh noes we're being attacked by Faction X". There is no meaning to it other than that.
I think you are over-simplifying things. Yes peaceful exploration is a part of what Trek is but Rodenbery was aware that there would always be dangers. I'll give you a list of some of the "Darker" TOS as well as Next Gen from his.
Where no man has gone before: One of the crew becomes hyper advanced and a threat to the ship. Spock tell Kirk "Kill him while you still can." Eventually Kirk is forced too.
The Galileo Seven:
Spock, McCoy, Scotty, and two others are marooned in a shuttle crash and Spock is forced to make difficult choices.
Errand of Mercy:
War with the Klingons erupts, come on, that's not sunshine and rainbows
An entire planet's population, including Kirk's brother are killed.
Pon Far, not a pleasant ritual, especially considering Spock nearly killed Kirk
Oh Come on!
The Doomsday Machine
Planetary destruction at the hands of an automaton and a Captain Ahab in the form of Commodore Decker
Kirk goes Captain Ahab
A private little war:
The Cold War, Trek style
Patterns of Force
Nazi of the future anyone?
The Ultimate Computer
A computer takes over the ENTERPRISE and destroyes three of her sister ships.
And the children shall lead:
An alien entity convinces a group of children to murder their own parrents
Day of the Dove:
An entity that feeds of anger, fear, and hatred
The way to Eden
Space Hippies! Nooooooo
The Next Generation pre Rodenbery's passing
The Crystalline entity's first appearance
Skin of Evil:
Armus, evil incarnate. He kills Tasha Yar for no reason.
Parasitic aliens take over Starfleet, Picard and Riker are forced to kill
Where silence has lease:
An intelligence captures the ENTERPRISE, treating them like lab rats. It kills one of the bridge crew
Picard kills his doppelganger
First contact with the Borg "They will be coming for us."- Picard
I think I've made my point. Trek is many things. Yes it is about peaceful exploration and the potential in mankind, but it is also about dealing with that evil, that darkness that resides in all of us and dealing with it, overcoming adversity, and resolving difficult moral dilemma.