Android window manager shows that a popup is displayed above the activity that showed it. For the window manager to do this, it must know the window of the operation in question. Since the view is inside the window, it knows which window the action is in if it knows about the view inside the activity window.
With the parent parameter, you say: "I want a pop-up window above the activity in the window in which the parent view is located."