Part of the human condition is a longing to be free, and another part is the need for revenge. We see both of these in The Count of Monte Cristo.
Dantes is arrested and imprisoned for political reasons, making his outrage at being locked up sincere. He works hard to get out of prison because he does not belong there.
When asked by the governor if he is well fed, Dantes responds that it doesn’t matter.
What matters really, not only to me, but to officers of justice and the king, is that an innocent man should languish in prison, the victim of an infamous denunciation, to die here cursing his executioners. (ch 14)
The need for companionship is almost as strong as the need for freedom, and Dantes is able to find this while in prison in the form of Faria. Faria is also a political prisoner. Like Dantest, he is brilliant. He is able to smooth out the rough edges and turn Dantes into the intelligent philosopher he is capable of being.
I will show you an entire work, the fruits of the thoughts and reflections of my whole life…. (ch 16)
Yet more than anything, Dantes wants revenge. Revenge is also part of the human condition. He carefully arranges to use Faria’s teachings and treasure to remake himself into the Count of Monte Cristo, and then from there determine who wronged him and what he can do about it.