Dronacharya and Kripacharya were powerful warriors who fought in the Mahabharata war. However, they were Brahmanas and not Kshatriyas.
Why did they decide to fight?
A Brāhmaṇa shall not take a weapon into his hand, though he be only
desirous of examining it.
However, the Manusmriti says Brahmanas and Vaishyas can take up arms when needed:
Twice-born persons shall carry arms: When religion is interfered with, when there is confusion among the twice-born castes caused by the exigencies of time,—(348) in his own defence, in cases of hindrance of sacrificial fees, in the case of outrages upon Brāhmaṇas and women,—if one strikes in the cause of right, he incurs no sin.
Is this why they decided to fight, to protect Dharma?
If protecting the dharma was the reason, they would never have taken up arms, as it was evident that the Pandavas were the one on side of true dharma (As Krishna was on their side, it itself is enough evidence).
So, one reason they took up arms (unwillingly), as they were ordered to. They were indeed the servants of Kuru-Rajya, and when asked by Dhritarashtra and Duryodhana, they could not deny.
Also, it is said that "There are no bystanders in a holy war", and Both of them were trained warriors, so they had no reason to not to fight.
Apart from that, Brahmanas are allowed to take up arms (when required), Parshuram is the best example.
It was a very basic reason called being true to your salt, do not betray your loyalty. Drona's early life was one of poverty, he and his family had to suffer a lot because of it. The incident when his son Aswathamma, was fooled into believing a mixture of rice powder and water as milk, hurt him deeply, and he resolved, his family would never be in poverty again. He approached his childhood friend Drupada, to help him out of his misery. However Drupada, in his arrogance, insulted and rebuked him, and sent him away. He walked out swearing to have his revenge.
Fortunately his brother in law, Kripacharya,( brother of his wife Kripi), bought him to Hastinapur. There is that anecdote about how Drona pulled out a ball from a well, using only blades of grass tied together, and this impressed Bhishma. Anyway knowing well of Drona's prowess with Shastra Vidya, Bhishma appointed him as the tutor for both the Pandavas and Kauravas. Yes Arjun was his favorite student, but that was strictly more of a teacher-student relationship, an admiration for Arjun's skills as an archer. While Arjun was his favorite student, and he admired Yudhistir for his truthtfulness, he could never betray his loyalty to Hastinapur, which had given him everything.
When it came to the final war, Drona went along with the Kauravas, because there was no way he could betray Hastinapura. It was not just the Pandavas, even if his own son Aswathama, had joined the other side, he would have still fought against him. Another factor of course was that his life long rival, Drupada, was on the Pandava's side. And there was no way he could ever have fought along with him on the same side.
The realtion of Kripacharya with Drona led him to fight against Pandavas.
They Fought because they were being true to their salt and not paying for the grace is not the duty of a real Brahman.In fact, if the brahman can't pay for the salt how can he/she follow other brahman duties like pray for the society and secure the blessings of the gods.
Apastamba say's so not counting the boundation of the situation but manusmrita adds further.
Whenever you read various scriptures describing same topics relate both of them if it relates no doubt but if it doesn't put a question on it.The two scriptures you mentioned in the question are not opposing each other instead the later describes it more and the former doesn't so because if even a single topic is described with atmost elaboration the millions of pages will be required.
Like any library, Hinduism Stack Exchange shares great information, but does not offer personalized advice, and does not take the place of seeking such advice from any Acharya, Pundit, astrologer, Guru or other trustworthy Counselor.