I believe rivals are determined by how long teams are in the same league. Me for example, I'm in mine for 10 seasons or so, and so is my rival. We've always been rivals except for one or two seasons I think. Sometimes we have close games, sometimes we don't, and our ranking after a season also differs every year.
So I think league affiliation is the main reason for rivalry.