Along with threat deterrent.
I can't think of any good argument for why the US military should have no offensive capabilities in the digital realm. It'd be the equivalent of staying out of the skies when flight became possible.
In any war, the US is going to come under digital attack, and it should be fully capable of responding both defensively and offensively. Besides that, shutting down the power grid of a country you're at war with via digital means, sure beats doing it with hundreds of missiles.
Oh, wait, no, it's not. Your German Shepherd isn't planting bombs underneath the neighbours' porches in case they decide to rob your house.
It seems like a bit of a self-fulfilling prophecy to me, which can be a very dangerous thing.
Vulnerabilities should be searched for, but when discovered they need to be disclosed and fixed, not used to create real world damage.