Just as magnets are attracted to each other when they have N and S poles, people are attracted to each other when their energies are compatible. You can check compatibility through the Saju (Four Pillars of Destiny), but it's more accurate to look at the qi (energy) with your own eyes to see if they are compatible.
If you go further and follow the connection between the two people's qi, you can see their past lives. The past lives will tell you whether you were good karma or bad karma. If it's good karma, you've already lived a good life, so as long as you don't do anything drastically different in this life, you can trust each other and get along with each other without much trouble. But if you're in bad karma, you've had bad experiences with each other, so it's hard to trust each other, and you're always anxious when you're together.
Some people say that if you have bad karma, you can just leave the other person, but that's easier said than done. Karma is something that can only be resolved by resolving the feelings that have accumulated in your heart, not by stopping seeing each other.
The reason people are attracted to each other when they are enemies is because they subconsciously know they have something to resolve. That's why it's important to know our past lives so that we can understand ourselves and the other person properly and know what we need to work on to improve our relationship.
Phoenix