Q: There are many occasions when Krishna advocates for bending the rules of war to defeat the enemy? Should he not practice what he preaches?
About the rules of the war, in the olden times, the rules of the war were well defined. Some of the rules were that war cannot be continued after the sunset, a person should not be attacked if he is not on a chariot or unarmed.
In the evening all of them used to take bath in the same lake!. The lake is still there in Kurushetra. Its called Brahmasaraovar.
Kauravas broke the law first in case of Abhimanyu. 16 people attacked and killed him from behind, while he was unarmed. From the 4th day onwards, the war was no more dharmically fought. As such when one party breaks the rules of the war, the other party will be forced to do the same.
Some of the last verses in Mahabharata asks the question: “Why are you not following dharma? You can enjoy Artha and Kama through a life based on dharma.”