More than likely it isn't a territorial issue. The behavior is probably one of mating and/or gender.
It is a continuous process for the female to keep the male subjugated to maintain the gender. On the other hand, it is also the 'growing process' to determine which will be the subjugated fish (the male) and which will be the dominant fish (the female).
Both fish send body language signals to the other as a part of their acknowledgment of their relationship. There are, of course, several different such signals including biting and outright harassment.