Dragonheart

An English knight, Bowen (Dennis Quaid), mentors a Saxon prince, Einon (Lee Oakes), in the Old Code, the ideals of chivalry in the hope that he will become a better king than his tyrannical father Freyne (Peter Hric). When the king is killed while suppressing a peasant rebellion, Einon is mortally wounded by the peasant girl Kara (Sandra Kovacikova). Einon's mother, Queen Aislinn (Julie Christie), has him taken before a dragon whom she implores to save the boy's life. The dragon replaces Einon's wounded heart with half of its own on the promise that Einon will rule with justice and virtue. However, Einon soon becomes more tyrannical than his father, enslaving the former rebels and forcing them to rebuild a Roman castle. Bowen believes that the dragon's heart has twisted Einon, and swears vengeance on all dragons.
Twelve years later, an adult Einon (David Thewlis) has his castle rebuilt. Kara (Dina Meyer) asks the king for pardoning her father after years of slavery, but Einon instead kills him in order to "free" him. As for Bowen, he has become a very skilled dragonslayer. Brother Gilbert (Pete Postlethwaite), a monk and aspiring poet, observes Bowen slaying a dragon and follows him to record his exploits. Bowen stalks another dragon (voiced by Sean Connery) to its cave, however the confrontation ends in a stalemate. The dragon states that he is the last of his kind, and thus if Bowen kills him, he will be out of a job. The two form a partnership to defraud local villagers with staged dragonslayings. Bowen calls the dragon Draco, after the constellation. Unknown to Bowen, Draco is the dragon who shared his heart with Einon, and through this connection, any pain inflicted upon one is also felt by the other.
Meanwhile, Kara, seeking revenge on Einon for murdering her father, is imprisoned after a failed assassination attempt. Einon recognizes her as the one responsible for his near-death and attempts to seduce her and make her his queen. Disgusted by what her son has become, Aislinn helps Kara escape. Kara tries to rally the villagers against Einon, however they instead offer her as a sacrifice to Draco, who takes her to his lair. Einon arrives to recapture her and fights Bowen, declaring that he never believed in the Old Code and only told Bowen what he wanted to hear so he would teach him how to fight. Draco intervenes and Einon flees. Kara asks Bowen to help overthrow Einon, however the disillusioned knight refuses.
Bowen and Draco's next staged dragonslaying goes poorly and their con is exposed. Draco takes Bowen, Kara, and Gilbert to Avalon, where they take shelter among the tombs of the Knights of the Round Table. Draco reveals the connection between himself and Einon, stating that he hoped giving the prince a piece of his heart would change Einon's nature and reunite the races of Man and Dragon. Through this action Draco hoped to earn a place in the stars, where dragons who prove their worth go after they die. He fears that his failure will cost him his soul, and agrees to help Kara and Gilbert against Einon. After experiencing a vision of King Arthur (voiced by John Gielgud) that reminds him of his knightly code, Bowen agrees to help as well.
With Bowen and Draco on their side, the villagers are organized into a formidable fighting force. Aislinn presents Einon with a group of dragonslayers, secretly knowing that killing Draco will cause Einon to die as well. The villagers are on the verge of victory against Einon's cavalry when Gilbert strikes Einon in the heart with an arrow. Draco falls from the sky and is captured. Einon realizes that he is effectively immortal as long as Draco remains alive, and determines to keep the dragon imprisoned. Aislinn attempts to kill Draco during the night, but Einon stops and kills her instead.
The rebels invade Einon's castle to rescue Draco as Bowen battles Einon. Draco begs Bowen to kill him as it is the only way to end Einon's reign, but Bowen can't bring himself to kill his friend. Einon charges at Bowen with a dagger, but Bowen reluctantly throws an axe into Draco's exposed half-heart. Einon and Draco both die, and Draco's body dissipates as his soul becomes a new star in the constellation. Bowen and Kara go on to lead the kingdom into an era of justice and brotherhood.

Question: why rebels invade Einon's castle?
Answer: rescue Draco; rescue Draco