Rampage does indeed deserve a title shot more than Mr. Davis does, but Davis is currently riding a significant wave of hype for being undefeated and exciting, and so the powers that be must have decided a Davis/Evans matchup would draw more fan attention than Evans/Rampage 2.
So no, merit doesn't really come into it. Remember how long it took Machida to earn a title shot despite having an undefeated record as long as your arm? He only got one after he started KOing people. His fairy dancing style was simply not deemed marketable enough for the general public.
I am excited for this one. Phil Davis is one of my local heroes in the UFC. I want to see him win this one.