The "enhanced for" loop, in the first case, uses an iterator to iterate through the collection -- this is actually hidden, but it is there nonetheless.
During iteration of a priority queue (and actually with most of the collections), you are not allowed to modify the structure of the collection, except via the iterator methods. A concurrent modification exception gets thrown when this is detected.