This question often arises in minds of people and I was no exception. Just like kings and other people request someone to teach their children, Mother Ganga made a request to Lord Parashuram.
Lord Parashuram taught Devavrata when he was a boy as he was the son of Ganga. He didn't live with his Kshatriya father then. So perhaps he being a Kshatriya didn't matter as he was the son of a goddess. And I guess Mother Ganga revealed to Lord Parashuram about Devavrata being a cursed Vasu, an elemental god. This is the reason Lord Parashuram made an exception and taught the young Devavrata.
Now someone tell me what's Devavrata's fault in this? 😲😆😕 He's blame free.
Now coming to the fight between Lord and his dear student, the fight lasted for twenty three days with no clear result. Bhishma fought only because it was his Guru's order and he couldn't refuse him. He reflected the character of a true warrior throughout the battle turned out to be invincible. Later when he was all set to use a divine deadly weapon "Parshwapastra" that had the ability to put the foe on sleep. When a warrior sleeps in the battle field, it's considered his defeat. And Parashuram wasn't aware of the weapon. Gods rushed to Bhishma and requested him not to use the weapon as it would humiliate his Guru. Due to his great respect for his Guru, Bhishma didn't use the weapon.
Pitrs then appeared and obstructed the chariot of Parashurama, forbidding him from fighting any longer. The spirit of Parashurama's father, Jamadagni and his grandfather, Rucheeka, spoke to him:
O son, never again engage in battle with Bhishma or any other Kshatriya. Heroism and courage in battle are the qualities of a Kshatriya, and study of the Vedas and the practice of austerities are the wealth of the Brahmans. Previously you took up weapons to protect the Brahmans, but this is not the case now. Let this battle with Bhishma be your last. O son of the Bhrigu race, it is not possible to defeat Bhishma.
In the end, the Gods showered praise on Bhishma, and he sought the blessing of Parashurama as his guru. The avatar then acknowledged that his former student was truly invincible, telling Amba:
Using even the very best of weapons I have not been able to obtain any advantage over Bhishma, that foremost of all wielders of weapons! I have exerted now to the best of my power and might. Seek the protection of Bhishma himself, thou hast no other refuge now.
"Mahabharata 189:1[6]