Was it ever explained why did they decide to go through the black hole and to another galaxy instead of simply going to Mars? Mars is much closer than Saturn and we know much more about it, so they could've started sending people there right away.
The film's official novelisation speaks to this issue. Bluntly, Mars is simply too hard for them to colonise through classical (rocket-propelled) means and by the point that humanity has mastered gravity control, courtesy of Coop and his crew, there are already better and easier candidates that they can access through the wormhole, starting with Edmunds World, a world with a breathable atmosphere and ready access to 12 whole planets worth of minerals and resources:
Mars had been an object of fascination from the earliest days of modern astronomy, in part because it seemed so Earthlike.
Whole civilizations had risen on the red planet—in the imaginations of Lowell, Wells, Weinbaum, Burroughs, and so many other famous authors. Those civilizations had all fallen when the first robotic landers reported the dull truth. If Mars had ever been a place habitable by human beings—or anything like them—it had been a very long time ago. And if there was life there now, it was hiding itself very, very well. Which is why they had left it behind.
Mars wasn’t going to be humanity’s new home, any more than the Moon was.
Lexible has done an excellent job already of explaining why we wouldn't go to Mars. (To repeat this in my own words, they wouldn't be looking for a planet with poorer biological prospects than their Earth — and Mars today would certainly have poorer prospects — but rather a planet that would be similar to a healthy Earth.)
But the Mars issue seems to be secondary to the actual question:
Why did they have to leave the galaxy?
First of all, "Goldilocks planets" are not so uncommon, even within our galaxy. According to the most recent NASA studies, there could be as many as 8.8 billion solar systems in our own galaxy with Earth-like planets:
Space is vast, but it may not be so lonely after all: A study finds the Milky Way is teeming with billions of planets that are about the size of Earth, orbit stars just like our sun, and exist in the Goldilocks zone — not too hot and not too cold for life....
For perspective, that's more Earth-like planets than there are people on Earth.
As for what it says about the odds that there is life somewhere out there, it means "just in our Milky Way galaxy alone, that's 8.8 billion throws of the biological dice," said study co-author Geoff Marcy, a longtime planet hunter from the University of California at Berkeley.
Note that this estimate was publicly available before principal filming began on Interstellar (but not necessarily before the final script was completed).
In any case, assuming that our galaxy does contain an ample selection of at least marginally Earth-like planets, it would seem that the future humans who created the wormhole had decided that none of the possibly 8.8 billion candidates were suitable for some reason or other.
The reason why they were not suitable may have had nothing to do with their biological prospects. Rather, it seems that the future humans wanted to point us to a particular combination: an Earth-like planet in orbit of a giant rotating black hole. This effectively kills two birds with one stone: it gives us a habitable planet and the data necessary to solve the "gravity problem" (care of the black hole), which would be necessary for moving the surviving Earth population to their new home, i.e. the realization of "Plan A".
They pointed the humans of Coop's time to a galaxy that did have a suitable combo — although he and Brand and the others would have to figure out which of the twelve planets at the other end of the wormhole were most suitable.
(Acknowledgements to @AndrewThompson, @Yasskier, @JaneS, and @Hypnosifl for useful discussions.)
Mars is inhospitable to macro-cellular life. The expedition beyond the wormhole is a crap-shoot (with twelve chances) to find a hospitable planet... one that has water, a breathable atmosphere, and both sunlight and temperatures in or near the Goldilocks Zone. Mars is on the near side of failure (but still failure) for water, does not have anything approaching a breathable atmosphere, is extraordinarily cold, and has questionable amounts of sunlight to support enough primary photosynthetic production to feed an herbivorous population.
Space is even worse on all fronts, with the exception of available sunlight. That's why we don't find living things there in the abundance we find them on our planet.
The humans of the future (apparently from Plan B) built the wormhole from the Solar System to Gargantua so the humans on Earth could obtain the quantum data necessary to solve the gravity equation and then leave Earth en masse.
Gargantua is a rare type of black hole with an event horizon you can cross without being ripped apart. As Romilly states:
Gargantua's an older, spinning black hole. It has what we call a gentle singularity...They're hardly gentle, but their tidal gravity is quick enough that something crossing the horizon fast might survive...
Being rare, they had to travel a long way to find such a black hole.
Mars obviously would not have the quantum data needed.