It is not unusual to do the right thing for the wrong reason - to make the correct specific choice but validated by the wrong general principle.
In the heat of battle, it can be forgotten that my enemy's enemy is not necessarily, perhaps not even usually, my friend.
Looking back over my life and the various conflicts, it is clear that sometimes I wanted the right thing, fought courageously for the right thing, but for the wrong reason.
In particular, I might be defending a position which derived from common sense or natural law: let's say I was defending 'the good' against attack - let's say I was defending traditional morality from political correctness.
But before I was a Christian there was no 'ultimate' reason for me to defend the good: no objective basis for saying that good was good. So how could I rationalise what I was doing, how could I justify my decision to defend the good?
How could I get the motivation to accept short-term disadvantage in pursuit of long-term good?
What made me brave?
Because that is the key - this matter of motivation.
Unless motivations are strong, then there will be no living of belief, and expediency will always prevail.
Ultimately it is about the virtue of courage: why be brave?
Courage is a virtue, and a key virtue upon which all other virtues depend; but the most usual reason for courage is - I suspect, at least on the basis of my own experience - not virtue, but in fact a sin: the sin of pride.
So that it often has been the case that I pursued a good cause, and (relatively) courageously, but for a bad reason - indeed a very bad reason, perhaps the worst reason of all: pride.
I was virtuous for a sinful reason.
My act of courage was a result of my own pride, a belief in my rightness. Not God's rightness.
My own rightness, and how could it have been otherwise?
Without God, there are only the wills of different humans - and courage can only be underpinned the belief in asserting one's own will rather than accepting the will of others.
Well, at least, that is the abstract justification. In practice people can do good, for good reasons, in the absence of a belief in God: they 'just do it' - but cannot explain or justify what they do.
They are inarticulate in their dogged resistance to sin: and thank God that they are.
Because the danger comes - especially for reflective people - in articulation: precisely in explaining to yourself, or to other people, why you are resisting what other people want. Explaining the grounds for your resistance, your disobedience, disruptiveness, what-looks-like your aggressiveness.
And in explaining to yourself or others, you may fall into the sin of pride, and this fall into pride may be self-reinforcing.
Courage from pride leads to the necessity for stronger pride to sustain and enhance courage.
Indeed it often is this way - which is why courageous fighters against 'the establishment' are often such very bad people. They get their motivation from pride, and the harder and longer is their fight, the greater the need for motivation becomes: until they are consumed by that pride upon which their courage depends.
Courage is a virtue; it is good, it is essential, it is very lacking in modern society: we need more courage.
But what we need is courage on the side of good, and for good reasons.
(Any other motivation for courage is lethal: the enemy's work.)
And the only side of good is the side of God; and the only good reason is a God reason.