Only one person can be involved in a personal union (hence the name). The trouble with being in a personal union – that is, sharing your monarch with a different country – is that your singular monarch might make choices that serve the other country's interests at the expense of your own. A personal union can also lead to a permanent union, something the lords of Poland did not want. (A notable example of this fate is the personal union of Castile and Aragon under Charles I, which lead to creating the nation of Spain.)
Mary held the Hungarian crown after her father's death – her sister did not. By choosing Mary, Poland would have had a monarch who held the crown of both Hungary and Poland, which is what constitutes a personal union.
By choosing Jadwiga instead, they gained a monarch who did not already hold any other royal title. As a result the crown of Poland was held by one person, and the crown of Hungary was held by another, preventing a personal union (of two royal titles held by one person) of Poland and Hungary from occurring.
Of course, the monarchs of the countries were still related, but two sisters can have differences of opinion, and can better serve the interests of their separate countries as separate countries. And yes, it may have meant that Mary or Jadwiga were theoretically in line for each other's throne, but the personal union was broken for the time being, and in practical terms one or both would have soon had heirs who would have put new entire family branches between the thrones.