Well this so happens because when you use an object of PriorityQue in a System.out.println(), then toString is called. PriorityQue class doesn't override the toString method. So the toString method from AbstractCollection class(a super class of PriorityQue) is called which uses an iterator on the PriorityQue object to display the elements. The documentation of the PriorityQue class says that the iterator of a priorityQue not necessarily iterate over the elements in sorted order.
So basically PriorityQue is not internally sorted. It only provides elements while polling and peeking in sorted order.