In Bhagavad Gita, Krishna reveals himself as the Self of all things in his role as Acharya to Arjuna. Thus, it behooves us to strive and understand the verses of the Gita with this in mind.
If Krishna mentions that stithpragya is the way of life, then why does he do so many things such as help Arjun in every possible way and help him win the war? If he was stithpragya why was he one-sided showing attraction towards Arjuna and aversion towards Duryodhana?
I mean no disrespect to the book, readers, followers and Krishna himself, it would be great to know why does he contradict himself?
In the Mahabharata, before the commencement of the War and after its Declaration, Krishna is approached (simultaneously) at his home by none other than Duryodhana and Arjuna each hoping to persuade Krishna to ally with them in the coming war. In this situation, Krishna puts himself on the balance with his army on the other side and offers them a choice - the choice of support of Krishna's army versus just the support of Krishna himself. While Duryodhana asked for the army, Arjuna is content with Krishna by his side.
It is immediate from this incident that Krishna is not averse to Duryodhana for he would not have offered himself in that case - this serves to highlight Krishna's equanimity and supremely steady wisdom; Moreover, as the Self of all beings, he is sticking by his words:
"When one relinquishes all the desires arising in the mind, O Arjuna, when one is satisfied in oneself with the Self, then one is said to be of steady wisdom (sthita-prajña)".
For Arjuna who is satisfied with the Self, namely Krishna, it is only fair that Krishna would try to help Arjuna in every possible way to win the war including the Gita Upanyaasam which, since Arjuna surrenders himself to the Self i.e., Krishna, steadies Arjuna's wisdom!