The rules of self defense are slightly different in war
That was the most defendable position, and given that Harry needed to find something there to stop you know who, it was necessary that they should defend there
The bad bois would've come after him to kill him anywhere he went, and if he just ran and hid, snake nose boi would've kept killing people