Basically they were sent to the middle of the quadrant, and the wormhole is on the far side. Either way would be about the same distance, though I think they were closer to the alpha quadrant than the wormhole.
Plus, wouldn't they have known that they would have to contend with the Dominion, and that might make it more difficult?
The distance supposedly was the same between Earth and teh Bajoran wormhole, so setting course for the heart of starfleet meant they'd have been getting home sooner, as opposed to going to Bajor first (Which is just outside federation space). So the net gain is Earth is closer.
As for the dominion, well they were relatively unknown at the time when Voyager launched, I believe that the Dominion "incident" with the Odyssey occured just before the ship's launch, so chances are the loss of a Galaxy-Class starship to an evil gamma quadrant empire wasn't public knowledge right yet. So the only real motivating factor on this would have been distance alone.
It could be that it was timing made the Dominion's existence not a sufficient factor. It would be logical that knowledge of the Dominion's existence would be a contributing, if not a determining, factor in deciding whether to head for the Gamma Quadrant or the Alpha Quadrant. I think, however, that in the absence of concrete knowledge of the Dominion's existence, the knowledge of the Borg's existence in the Delta Quadrant might encourage them to head for the Bajoran wormhole; therefore the choice to traverse the Delta Quadrant is at least partially a mystery ProfessorTrek 05:09, August 16, 2011 (UTC)
According to a few maps, Federation space is slightly closer to Ocampa than the Idran side of the Bajoran wormhole. Plus, it wouldn't matter to them if they ended up in Federation space or the Bajoran wormhole because they were trapped in the Delta Quadrant on a mission into the Badlands, and it wouldn't be a hinderance if they ended up by Deep Space Nine on the other side of the wormhole.
The first episode of Star Trek: Voyager was production number 343. The Jem'Hadar, production number 329, was when the Federation first found out about the Dominion, and The Search, Part 2, was production number 331. Voyager's crew would have known about the Dominion and how dangerous they could be. The Dominion likely wouldn't let them use their side of the wormhole to return the Alpha Quadrant anyway.
By heading to Earth, they're more likely to hit the Beta Quadrant first and can always reach the Romulans or the Klingons first. This has the benefit of relaying their status to the Federation. Plus, what if they did go to the Gamma quadrant, only to find that the wormhole was collapsed, or something happened to the wormhole? Then they would be traveling in a triangle to home, instead of a direct course.
I personally think Voyager should have traveled back in time when they encountered the Barzan wormhole, and then travel back to their own time when they got to the Alpha Quadrant. They've mucked up the timeline plenty of time already. It's not like they're going to do any worst.
That whole Barzan wormhole time travel idea is almost too stupid to deserve a response. Voyager may have messed around with the timeline but they never traveled through time by choice. As for the whole choice of which direction to travel they knew the Dominion controlled space near the wormhole and knew that going near Dominion space would be suicide so they took their chances going the other route hoping not to run into the Borg. The Delta quadrant is a huge place so there was a chance they wouldn't have to travel through Borg space since they didn't really know what areas the Borg controlled before "Scorpion". Anyone would rather risk the unknown than head for certain death.