I would argue that if you beat a great champ like RDA you are the legit champ, no matter how you got to the title.
I would also argue Eddie was a legit contender.
YES his fights with Pettis, Giblert and Chandler were poor and maybe Eddie didn't earn those wins.
But the mere fact that he fought close fights with the #1, #4 and #9 ranked lightweights in the world (Sherdog rankings at the time) within a span of less than 3 years, made him the contender who had the most experience with high level fights.
Eddie had fought everyone in the top 5 except RDA. And he had championship experience. To me it was only natural that he got the title shot.
Even if Khabib's performances were superior, his opponents were not as highly ranked. Sure, he would've earned a title shot before Eddie if it wasn't for the injuries. But now that wasn't an option.
Even Sherdog's rankings had Eddie as the top contender after his win over Pettis.