Exploration involves more than just visiting new worlds and new civilizations, it also encompasses investigating any stellar phenomena--like the aforementioned gaseous anomalies--encountered during the course of the mission as well. The latter may not be as exciting as the former, but a ship may spend awhile doing a preliminary examination before moving on to the next point of interest (a science vessel can follow sometime later for more detailed and lengthy research).
I always took it that the Excelsior was on an exploration mission in the Beta Quadrant and was conducting some final routine scans of those gaseous anomalies as her final assignment before heading home. But like the original Enterprise, I also believe the Excelsior was really a multipurpose vessel and could really do all sorts of other missions as required by Starfleet. Out on the frontier, where the nearest Starfleet vessel could be days or even weeks away at high warp, you'd probably need a multimission ship that can do everything from exploration, to defense/interdiction, to even carrying supplies to a remote outpost or Federation colony.
Exactly, at the end of the day we have to remember these are TV shows and movies so the capability of the ships are dependent on the writers and overall plot and as these different productions are written by different people they can vary greatly.
A case point being the Enterprise D, if you rewatch TNG and Generations they gave the impression the Galaxy class and the Enterprise herself was an impressive and powerful ship but you rarely saw her at her best.
Well...I actually disagree that we rarely saw her at her best--I think more often than not we did. Even though she was only around for a short time, the
Enterprise-D was involved in an impressive number of first contacts and incidents that were vital to the security of the Federation. She probably did more in just seven years than many ships do in their entire operational lifetimes. While her end was effectively the result of a well-placed sucker punch by a Klingon ship a fraction her size, no ship is invinicible, IMO. Goliaths have been taken down by Davids before (it's generally how Borg cubes are taken down).
Compare the battles in these shows where she fires a handful of shots to the damage the Galaxy class ships do in the Dominion War.
An in-universe idea could be that those Galaxy-class ships were newer and lessons learned from their earlier sister ships (namely
Yamato,
Odyssey, and
Enterprise) were incorporated into them. At the time of the
Enterprise's demise, the Galaxy-class might have still been considered a fairly young design only just entering its second block of production. By the time of the actual Dominion War, I think there are bound to have been improvements in the design.