It makes the verb progressive and gives the sense that the action continues over time. 아/어 가다 moves the verb from the present time, going forward. 아/어 오다 means something has been ongoing from the past and into the present.
In these example sentences, as time goes on, one forgets (and will continue forgetting) bad memories. And a compatible couple starts resembling one another (and the resemblance grows over time).
You could use 아/어 오다 to talk about things that have been happening and still continue up until now. In English we'd say I've been studying Korean, I've been taking care of my health, etc. By using this grammar, you convey the sense that the verb is not a one-time thing, but an ongoing process.