I rode through some water and a bit of dirt recently and not a speck. Anyway, panniers are usually covered in hardy material. Mudguards do protect the pannier to some extent (spray water ricocheting off the rack top) while also not hosing the riders behind me down.
Mudguards don't protect the pannier.