I think that's basically true of the entire game. DM's usually don't write combats that are purposely too hard or are the perfect foil to the group (unless that itself is a story moment). The combat is written with the party in mind. Modules are written such that a Generic Party can succeed - the horde of goblins might be easier to beat if you can cast fireball or sickening radiance, but being nearly unhittable with 25 AC and just hitting them one at a time will work too.
Being a good DM is about writing an interesting story that the players feel like they have agency in. A good class is one that gives the player lots to do, and again, feel like they're impacting the world in meaningful ways.