Why was this done? Just because the newer question had a few less upvotes? Why does the duplicates system even allow this?
It has less to do with the age of the posts and more with the quality.
As you can see, the newer question has a couple of high quality answers, which go into a decent amount of detail around
&> and what they each do and why you might want to use one over the other.
The older question doesn't have as high quality of answers, so it was marked and closed as a duplicate.
I remember a comment made by David Foerster on one of my posts. The comment stated:
Duplicates are marked irrespective of the dates posted. Duplicated are considered on the quality of posts.
Stack exchange's purpose is to be a rich, navigable archive of useful information for future users of the internet to refer to.
Stack exchange does not care about your user experience except insofar as it directly helps accomplish the goal described above.
Also, you will notice that they have gotten much stricter about question-asking as time has gone on, so I would say back in 2013 when the second variant was originally asked, they weren't vetting carefully for duplicates. By the time the reviewers decided to mark it as a duplicate, the second question probably had received much more attention and was determined to be the more useful resource for future Googlers to arrive at.