I haven't studied the code but my interpretation has been that any given dialog is displayed in the same position where it was previously appeared. I agree that I've sometimes found it inconvenient that this position can be distant from the point of initiation. However, with other applications I have sometimes found it inconvenient that a dialog is displayed near the point of initiation but not in the location that it had been carefully placed.
Clearly this is simply a choice and there's no way to determine which option is most convenient to any given user, and any given time. Personally, I find that sometimes I'd prefer one way and sometimes the other but I've never established how the software could determine my choice.
For comparison, I noted again today that the Microsoft Outlook email message find dialog is similarly displayed in the previous position, even if that position is very distant from the message window that initiated the dialog.
Hope this helps.