If an Allied pilot had flown over Switzerland and bombed some of the banks there, do you think a courts martial would have accepted such a justification?
Most Swiss bankers were innocent. True, they were no doubt aware that some of the money they handled was dirty, but most car dealers today are no less aware that some of the cars they sell will be used by dangerously drunk drivers. Does that mean they are complicit in homicide?
Besides, there may have been other ways to deal with the horcrux. A horcrux which is sitting in a bank vault where nobody can get to it won't do very much if nobody can access it. If Beatrix Lestrange and Voldemort were killed while the cup was still at Gringotts, it should have been possible for the Ministry to destroy it afterward I would think.
Voldemort COULDN’T be killed until the cup was destroyed.
That’s the entire thrust of the book: Destroy the horcruxes so that Voldemort can be destroyed.
Voldemort couldn't be killed as long as the hufflepuff cup was intact..It was a horcrux, and that bit of his soul that was in it would've prevented his death.
He couldn't "die" while there was still a piece of his soul residing in a Horcrux