Because you've lost with the 2nd 2 times.
the rule is HEAD TO HEAD is first, goal difference is 2nd ! it's not nonsense and already applies to the real CL competition
if for example you beat him 1-0 but he beats you 2-0 then goal difference doesn't count! HEAD TO HEAD means he wins, no matter what the goal difference is and it's also in the rules in top 11. GET OVER IT
it's the same rule applied even on the real champion league..
but in the domestic league the rule might be different
i feel you ahah, but its a rule: you lost two times with him so he passes despite goal difference
another scenario would be like this one
in this case we both won all matches and draw against each other, i have a better goal dif, dominance in goal scored, BUT, in the draws, the first one i was away and scored 0 goals, at home he scored one goal away, so he basically " beat " me and with the rules of goals away he goes after me.
Oh an you can't imagine how much i sweared XD