It is, however, quite easy to go too far in the other direction. I've definitely hit that point before, where you're so optimized it's not fun at all anymore. When every problem can be solved by a spell, there's no creativity left... nothing can challenge you. The fun is in getting around the restrictions... if there are none from the outset, then who cares? Playing in god mode is only fun for a short while. Eventually you want to be challenged again.
+1
The answer lies in moderation.
For casters this is easy, battlefield control spells ARE generally what I consider fun, and even AoE direct damage sometimes make a good showing. All you need to do is choose not to make the more trivializing stuff like divinations, planar binding and dungeon bypasses and you're in good stead. If you have skilled types in the party, let them do their thing over stealing the show. So for a caster, its just using a little restraint, or at the least, playing one with a fixed spell list(spontaneous types for example) rather than one that changes dramatically to fit the situation(goddamned divine prepared casters).
For everyone else, this is a headache. Effective melee strategies are often all or nothing. Sure, Ubercharging kills practically anything it rams into, but when you're not doing it, or when it lives, you're screwed, and it rather limits what you can do to be effective. D&D just isn't very good at cinematic melee combat, even with ToB.
For DMs, its complicated. Any decently optimised party will chew holes in encounters in a hurry, unless you make use of lots of moderately challenging foes over singular 'boss' types. Solo enemies die and fast, unless they go first and then probably some of your players do that instead.