Symbiosis is a dependent relationship between two organisms. There are three basic kinds: parasitism, in which one partner (the parasite) benefits and the other (the host) is harmed; commensalism, in which one partner (the commensal) benefits and the other partner (the host) is indifferent, and mutualism, in which both partners benefit. These three states are evolutionarily related to each other: parasitic relationships tend to evolve into commensalistic relationships, and commensalistic relationships tend to evolve into mutualistic relationships. This makes perfect sense. Any accidental genetic change in the host which reduces the harm (or causes benefit) from the parasite would certainly be favored by selection; any accidental genetic change in the parasite which keeps its host, upon which it depends, healthy and alive longer would also be favored. So the selective pressure on both sides is toward less and less damage to the host.
From Life Together: The Origin of Mitochondria and Chloroplasts