According to p.86-87 of JPA Pro 2nd edition, regarding to many-to-many bidirectional relationship:
...there is no way to determine which side is the owner of the relationship. Because every bi-directional relationship has to have both an owning side and inverse side.
We must pick one of the two entities to be the owner. In this example, we picked Employee to be owner of the relationship, but we could have just as easily picked Project instead.....
Note that no matter which side is designated as the owner, the other side should include the mappedBy element; otherwise the provider will think that both sides are the owner and the mappings are separate
unidirectional relationships.
For example, in chapter 4 of many-to-many relationship, it chooses Employee as the owner and the project as the non-owner: