One possible reason is that space fighters would very probably be totally impractical in real life war between civilizations from different planets and different star systems.
Submarines travel in a single medium, water. Surface ships travel at the interface between two different mediums, water and air. Airplanes travel in a single medium, air.
Thus both submarines and airplanes have much more freedom of vertical movement than surface ships that are stuck at the interface between water and air.
Because water is many times denser than air, it offers many times more resistance to vehicles travelling through it than air does. Thus a tiny fighter plane with a tiny engine can travel many times faster in air than a nuclear submarine can travel in water, or a giant battleship or aircraft carrier can travel on the surface of the water, despite the larger vehicles having many times larger engines.
But there are no mediums in space. There is no interface between two mediums in space because there isn't even a single medium in space. Space is simply an empty vacuum that offers no resistance to vehicles. And there are no different mediums in space for tiny fighter spacecraft to travel much faster in one medium than giant space battleships can travel in another medium that is just a few feet away.
Space battles are likely to be fought at very long ranges and the separation between two space fleets in a space battle is likely to be many, many times the volume filled by the formation of either of the space fleets. Each space fleet will occupy a vast volume of space, but each of the space fleets will be very tiny compared to the vast distances between the two fleets as they shoot at each other.
Space warships will not move among and between enemy ships to blast them because any space ship, whether vast battleship or tiny fighter, will be vaporized before it can get anywhere near any enemy battle fleet, let alone get among and between the enemy spaceships.
Space battles will be fought by space fleets in formation with the two fleets separated by vast distances. There won't be any rapid maneuvering by individual ships in dogfights during fleet battles.
So if Gene Roddenberry, Gene L. Coon, and other Star Trek creators thought about the reasons why small airplanes tended to dominate WWII naval battles, they would have realized those reasons don't apply in outer space.
11-16-2018 Responding to comments.
Imagine a fleet of a thousand space warships arranged in a grid 10 x 10 x 10, each ship separated by a thousand kilometers from its neighbors so the explosion of one won't damage the others. The fleet would form a cube 10,000 kilometers on a side.
The fleet is heading straight for an enemy planet. The fleet can begin exterminating all life on the enemy planet as soon as it gets within firing range. So the enemy planet will have to surrender once the fleet gets close to firing range.
Meanwhile, a similar defending fleet is traveling from the planet toward the invading fleet. I assume that the two fleets will want to decelerate at rates calculated to make them stationary relative to each other at what they consider to be optimum firing range.
Another option would be for the two fleets to pass through each other, then decelerate to a stop relative to each other, and then accelerate back toward each other, repeating several times.
But if a ship is damaged or destroyed as the fleets head toward each other, the shell of rapidly expanding plasma from it will continue at the same speed and will be so dense compared to interstellar or even interplanetary space that it will be like a brick wall for any ship in the other fleet that rams into it. A ship that smashes into such a cloud of vapor is likely to produce another cloud of plasma that will damage or destroy any following ship that smashes into it.
And the defending fleet will not dare to pass through the attacking fleet for fear that the attacking fleet won't stop to engage the defending fleet but simply continue toward the target planet. The defending fleet will have to decelerate to remain stationary relative to the attacking fleet, even if it means reversing course and heading back toward the planet to keep up with the attacking fleet.
So the two fleets will fire on each other at firing range, which may be about 100,000 to 1,000,000 kilometers. Thus it will take about 0.3335641 to 3.335641 seconds for targeting data about a target fleet to reach one fleet and 0.3335641 to 3.335641 seconds for the ray guns fired in response to that firing data to reach the target fleet. A total of 0.6671282 to 6.67128 seconds.
So how far can a ship's secondary lateral propulsion system move it sideways in 0.6671282 to 6.67128 seconds? Would that be far enough to get out of the cone of destruction of even the tightest ray gun or laser after expanding for a distance of 100,000 to 1,000,000 kilometers? I suspect that no matter what sort of lateral evasive maneuvers the fleets could use, it would be very improbable for a ship to avoid a ray from an enemy ship.
The defending fleet would certainly have to keep the main axis of their ships and their main propulsion systems pointed toward the enemy fleet, and so be unable to use them for evasive maneuvers. If the defending fleet turned the main axis of their ships 90 degrees away from the enemy fleet so they could travel very fast in evasive maneuvers, the computers in the enemy fleet would no doubt be programmed to detect the first such rapid lateral evasive maneuver and instantly accelerate the ships in the enemy fleet to zoom through the space just vacated by the defending fleet and head toward the target planet.
Then by the time the defending fleet could turn the axis of the ships to pursue the attacking fleet the attacking fleet could be out of range of the pursing defending fleet, and the defending fleet would only be capable of following the attacking fleet helplessly until the attacking fleet came within range of the target planet and the target planet instantly surrendered to the attacking fleet.
And no doubt it would be against the laws of war for the defending fleet to attack the attacking fleet once the planet surrendered, because that might cause the attacking fleet to blast the planet, destroying all life in a single second of attack, before turning to fight the defending fleet.
Note that in TOS starships fired on each other at distances specified as tens of thousands of kilometers or hundreds of thousands of kilometers in various episodes. Perhaps at distances ranging from 10,000 to 200,000 kilometers. At the speed of light a phaser beam would strike the target 0.06671282 to 1.33424 seconds after the targeting "space radar" beam hit it, giving even less time for lateral evasive maneuvers to get the target ship out of the cone of the phaser beam.
Of course in TOS it is quite probable that starships' "space radar" systems and phaser beams use subspace radio radiation that travels many times faster than light, giving even less time for evasive maneuvers.
Note that the closer a starship gets to an enemy starship, the stronger the enemy phaser beams will be when they hit the starship. If the starship is hit at 128,000 kilometers and then at 64,000 kilometers, the enemy phaser beams will be four times as strong at 64,000 kilos as at 128,000 kilos. At 32,000 kilos phaser beams will be 16 times as strong as at 128,000 kilos, at 16,000 kilos they will be 64 times as strong, at 8,000 kilos they will be 256 times as strong, at 4,000 kilos they will be 1,024 times as strong and so on.
At 32 kilos phaser beams will be 16,000,000 times as strong as at 128,000 kilos, at 16 kilos phaser beams will be 64,000,000 times as strong as at 128,000 kilos, and so on.
And of course the closer two enemy starships get the less time they will have to evade each others phaser beams.
So it would be suicidal for starships to fight at the kilometer or less ranges that they often seem to do in the later movies and television shows, unless they have defensive force shields that are many millions of times more powerful than those in TOS.
IN the days of wooden fighting warships, the ships usually fought at distances of tens or hundreds of meters, and the ships of two different fleets could be mixed together in a melee. But in the 19th and 20th centuries cannons became more and more powerful and their ranges multiplied, so that in World War One and World War Two battleship guns were usually fired at distances of several kilometers.
So it would certainly have been possible for the creators of TOS to imagine that centuries in the future space ships would fight with ray guns at distances thousands of times greater than those in WWI and WWII, and it would also have been easy for them to understand why small fighters like the carrier aircraft of WWII would not be useful in space wars.