it's not really a question of if the martial party 'would do just fine' though, it's which party would be more apt to face the adventure blind, the casters get their subclassess too y'know?, i struggle to imagine that a party with a war cleric, moon druid, clockwork sorcerer and diviner wizard couldn't match the martials and beat the adventure more easily, they might not match for DRP but when you've got another healer, spiritual weapon, wildshape, haste, bless, web, hypnotic pattern, polymorph, fly, entangle and more, the martials might have higher DPR, but the casters have far greater ability to multiply their chances to deal damage as well as mitigate, reduce and recover the damage they do take.