Besides antimagic fields and dispels, casters also have a problem if they face more than four combats a day or going to get disrupted from their long rest. Martials have an advantage that they can go all day, at the same power, and then go the next day without rest and be just as effective. Oh, and they're generally quite effective even from level 1, while casters take a few levels to get online.

The situations where casting isn't as effective as normal may or may not be meaningful, depending on the table and the DM. Still, I don't think it would be bad idea to have at least one martial in a party if you do encounter some of those edge cases.