Wasn't part of the OP's point that he had an appointment and he was still made to wait beyond the appointment time? Then it turned out that the appointment was hardly necessary, so he waited an hour then a bit longer for something that didn't require technical assistance (sales staff could be directed to try with a spare set of earphones first and if that doesn't help, then schedule an appointment).
There are times that I would be quite willing to get an appointment for if it meant that I get to deal with someone who actually knows what they're talking about, instead of the average customer service rep over the phone or in a store. Obviously though there's a line that needs to be drawn because if a technical person's time is used up with lots of non-technical things to sort out that someone of a lower wage could sort out, then that technical person's time isn't being optimally used. The most ideal system ensures that non-technical people sort out as many problems that don't take an excessively long time because they're non-technical, and the technical people just take on the jobs that benefit the most from their expertise.
I personally (as a customer) would be annoyed if I had to make an appointment / wait an hour just so a set of earphones can be swapped. A quick test of earphones hardly requires much technical skill.
He waited an hour because he didn't make an appointment. Here is why he needed to make an appointment:
1: You said yourself that a quick test would have solved the issue, they need to be able to do the test. The Genius Bar runs tests. Because if someone on the floor runs the test, and it fails the test, do you know where you go next? The Genius Bar.
2: The OP never specified if the device had been tested with any other headphones, or what aspect of the headphones wasn't working. The EarPods bundled with an iPhone 5 are more complicated than standard earbuds, they have a mic and an inline remote.
3: Since he had never specified that the device had been test with another set of headphones, the problem could have been the headphone jack on the device rather than the headphones themselves. Had it been the device, well... that's what the Genius Bar is for (honestly, they still would have replaced the device, but they would have checked a few additional things).
Had the OP asked anyone that was more of an Apple user than he was, they would have probably have told him in the first 30 seconds that he needed an appointment.
Does it suck that he had to wait around so long? Yes. Does it suck that even after making his appointment he then had to keep waiting? Yes.
Sometimes we have to wait even when we make appointments. Not just at the Genius Bar, but at the barber shop, dentist, doctor, etc. So this isn't some crazy waiting phenomenon that only occurs at an Apple Store.