Resistance against foreign troops in your own invaded country? Yeah, that's understandable. As was the French Resistance of WWII.
The only way this incident would be applicable to that situation though, would be if in the 1940's a French man emigrated to Germany and lived there for years, then one day decides to attack an off-duty German soldier (who may have simply been a truck driver) in front of everyone.
Then said violence just ends up spurring more support for military action against the French. The cycle of Violence continues.
I'm not trying to draw a parallel quite so closely. It would be hard to, since Germany was a country at war, and didn't have open borders. And I said earlier, I am not justifying this attack. It was wrong, and heinous.
Resistance fighters killed surrendered German soldiers in brutal fashion at times...far beyond a 'mere' execution, which is what made me think of this. IN their own minds, I suspect these killings were justified due to various German attrocities. Much like the prison camp murders at Dachau. Given they were victorious, these murders were glossed over, or moved on from pretty quickly, but it's worth noting that there is nothing particularly unique to Islamists in committing these type of attacks. I also think these people may see themselves as freedom fighters, rather than terrorists. Not how I'd describe them, but that's not the point (and I'll admit, there is a fair amount of conjecture here, but bear with me...)
I would imagine that in their minds these murderers are linking themselves to a war they probably have limited understanding of. They are associating themselves on one side, with British soldiers being on the other. They then walk the streets seeing British soldiers, etc. They then take what in their mind is a military action (ie. murdering the soldier).
I completely agree with your closing about the cycle of violence. Couple of points;
1) Rational people need to condemn this if they want progress to be made towards peace. As mentioned before, I am happy to get in a detailed discussion with anyone who thinks this attack makes any sense from a military strategy point of view.
2) Muslims need to work better at articulating the differences between radical and aggressive terrorist elements of their societies, and disaffected or resisting elements. To my mind there IS a difference between armed Iraqi militia fighting American soldiers on Iraqi soil, and these type of attacks.