The trajectory of Maricha’s association with Rama is interesting. From being a sworn enemy of Rama, he becomes aware of Rama’s greatness and superior strength, and is able to give sane advice to Ravana, though it goes unheeded, pointed out Damal Sri Ramakrishnan and Srimati Perundevi in a discourse. He has seen Rama as a twelve-year-old boy display tremendous skills in archery. During that brush with Rama, His arrow spares his life but chases him thousands of leagues away.
There is a second encounter narrated by Maricha to Ravana that had taken place when Maricha had returned to Dandakaranya and disguised himself as a beast with a flaming tongue and two sharp horns. With two other rakshasas as companions, they would take the form of animals. They would feast on human flesh, frighten the ascetics, kill them and drink their blood. Once, Maricha sees Rama, Lakshmana and Sita and to seek vengeance, he attacks them along with his demon friends in the form of ferocious beasts. Rama shoots three arrows at them that kills Maricha's allies, but narrowly misses Maricha, who flees in fear. Ever since Maricha has adopted the lifestyle of an ascetic, set up an ashram and has been living in it in constant dread of Rama. Even the syllable ‘Ra’ sends waves of fear in him. So when Ravana seeks him now, with the plan to abduct Sita, he makes it clear to Ravana that such a step is a sure path to ruin that would bring doom to him and the rakshasa race.
But he also knows that for his part, whether he accedes or not to Ravana’s plan, his death is certain. So he agrees to go as the golden deer that would give him the opportunity to die at Rama’s hands. He accrues spiritual gain by calling out to Sita and Lakshmana, during his dying moments.