I'm sure the key to this lies in the 'millisecond precision'. Your Date objects are created in sequence and most likely differ only by a millisecond or two - if that. So when you print them out showing only hours, minutes, and seconds as you have, they appear to have the same value. But because the compare method works at a millisecond level, they are correctly determined to be different in the if statements.
See where your hand is? Not there. It's next to this tiny ad: