Just guessing the person that submitted later has significantly more karma or popularity. It seems to happen quite a bit. There's also time of day to consider, it's possible this made it in when more people are browsing by newest and upvoted pretty early.
The question rather is, why would the system allow the same URL to be submitted twice. In the past when I tried to submit something already in, I was redirected to the existing post and my submissions was converted into an upvote.
A five-day-old HN submission is effectively dead. Would make sense if the behavior you describe only happens to dupe urls within 24hr of each other if the first one hit a certain threshold of traction. Else makes more sense to allow the dupe submission to give it another shot.