Why can questions be closed as duplicates of older questions?
As others have mentioned in the comments, duplicates are not there to chastise users by yelling "someone else has already posted this!" They exist to direct users to where the information already exists on the site, which is why we discourage deleting duplicates which provide alternate routes to that information by leaving them as sign posts. Now, if you're going to use duplicates to direct users elsewhere, you want to make sure they are ending up at the best information, not just the earliest information, which is why we allow closing questions as duplicates of newer questions.
So what about the case where the asking dates were just overlooked?
Well, we can't possibly know whether or not that happened, so it frankly isn't worth considering. The dates the questions were asked just really do not matter at all. The only question you should be asking yourself is: "Which question would I rather end up on if I was looking for this information on Google?" Whichever one answers that for you is probably the one that should be the target. If that decision involves reversing the direction of the duplicate, you might bring it up on Meta so the community can evaluate whether or not the direction should be reversed.
What if both questions contain great information?
Evaluate whether or not the answers of both would make sense on one question. If the answers could easily be migrated either way with minimal effort, flag for moderator attention requesting they be merged to preserve the information of both questions. Merges usually go in the direction of the oldest question, but only for the sake of sanity (keeping the answer dates after the ask date - answer dates that occurred before the question was asked look weird). But that's also not always the case. Sometimes it makes sense to merge into the newer question. For example, if the newer one has 100,000 views versus the older's 100 it is obvious that the newer one is much more searchable and a better landing page for visitors.