To the OP-
I'm going to write this from a "Geth Empathy" point of view, though there are obviously multiple ways to interpret and anticipate the motives and outcomes of this choice.
So, bring on the idealism:
In order for change to occur, you first have to believe that something else is possible.
Look at Shepard's Paragon talk-down here: "The Geth don't want to fight you! If you can believe that for just one minute, this war will be over. You have a choice. Please. Keelah Se'lai."
He directs these lines to the Quarians, but it's just as important that the Geth also believe that there is another way, that organics are not forever out to destroy their kind at all costs.
From what is shown us in the trilogy, Shep (depending on playstyle and choice, of course) has been the one and only organic--still in existence--not hostile toward all Geth. That is Shepard, not the Quarians who are the immediate threat at the moment the choice must be made.
Imagine that, as Legion, all organics but one have only shown hostility. Organics, your creators even, are at this very moment about to eradicate your entire people from the universe. You have the power not only to save them but also to uplift them to (what it perceives as) a better existence. What would you do to ensure this?
Now imagine that the one and only organic who could possibly be considered an ally, turns on you and is about to destroy what you consider the last and only hope for your kind.
If you consider all of this, Legion's attack is much more than anger at not getting its way.
It's a bitter fight for survival.
And if Geth could "hope," I'd even dare to say that it's the loss of hope that peace could ever exist with organics.
In that context, the attack makes sense to me.