Why if Lord Parashurama is a Vishnu Avatar appear with Rama in the Ramayana and with Krishna in the Mahabharata?
There are only 7 Cheerenjivi's (the eternal Beings) out of which one is lord Parshurama.
See following for all names
अश्वत्थामाबलिर्व्यासोहनुमांश्च विभीषण:कृपश्चपरशुरामश्च सप्तैतेचिरंजीविन:
Also Lord Parshurama is an Avatar of Lord Vishnu and his every avatar has a specified work to do in it's whole life span out of which Parshurama was the one with a life upto the Chaturyuga so he had a large amount of work to do for a long time in Coming Yugas (after Treta Yuga(his birth Yuga)).
Lord Parshurama is the one which is Bramhin as well as a Warrior it means he is a Bramhin Warrior a perfect Guru for every being, he also has all the magical weaponry traning (astra vidya) with him. Because of this qualities he has been casted as a guru of lot of characters that too very Important like Bhishma Pitamaha, Karna,Kalki(see kalki purana for refrence).Also he Supplies all knowlegde to the Important Characters at Right time for sake of the God's will and planning.
Cases when he appeared and why
In TretaYuga In case of Ramayana in Sita Swayamvar after the Breaking of the Pinak Dhanush of Lord Shiva ,Lord Parshuram who was in medetation on Mahendra Parwat became angry and due to his sattvic anger he came to Lord Rama and tested him for his patience and most importantly
he Gave his Bow the Sharang Dhanush to Lord Ramaas it was nessesary for Ravan Vadh refrences:Wiki
In DwaparYuga In case of Mahabharata he was the mentor and guru of Bhishma Pitamaha ,Karna. Lord Parshurama was all aware of the future incidents as he was himself Vishnu he knew Karna would be a obstacle in Dharmsanstapan Path (In path of Dharma) so to ensure his death he cursed him (for his lie of being Bramhin in order to become his disciple) of losing all his falsely gained knowlegde at the time when he needed it most and it happened to be the fighting time in mabharata war and he died for the same reasons due to his death Pandava's win,this answer tells the story of meeting of Lord Krishna and Lord Parshurama
Future Appearance in Kaliyuga In future i.e. Kaliyuga it is said that Lord Parshurama will be the Guru of Lord Kalki
The Kalki Purana writes that he will reemerge at the end of Kali Yuga to be the martial and spiritual guru of Kalki, the tenth and final avatar of Vishnu. It is foretold that he will instruct Kalki to perform a difficult penance to Shiva, and receive the celestial weaponry needed to bring about end time.source Kalki.
In these all lilas(Games/Actions) of Lord Shri Hari Vishnu he played a role for a long time as Lord Parshurama to help himself in tasks that he had to accomplish himself.