Yes, it gives the Greataxe a niche, but niche protection is largely an outdated philosophy.
It's not "niche protection" to provide two actually different options - like the greatsword with its higher minimum damage, higher average damage, and comparatively more likely to be average or near to it damage, and the greataxe with its lower minimum, lower average, and comparatively higher chances of rolling low or high damage - that gets a further bump in difference if you play a barbarian and choose the axe, which is incentivized because axes are perceived as fighting the barbarian archetype more strongly than swords.
And secondly, this leads to some rather absurd situations like a two-handed Longsword out-critting a Greatsword.
"Absurd" is subjective, as is "out-critting". For instance, comparing 3d10 to 5d6 I know that I would pick the 3d10 because I like the higher chance of getting near the maximum and don't mind the greater risk of getting near the minimum, while my buddy that plays a barbarian would choose the 5d6 because it is less likely to roll below average and has a better "worst" result - the difference primarily being that I believe I am lucky, and he believes his dice hate him.
Going up to 4d10 vs. 6d6, my buddy still wouldn't choose the same as I would - the 4 higher possible damage that I can be hopeful for, doesn't outweigh the 2 higher minimum and better odds of getting around 21 for him.
Why would they care if people use the greataxe or not?
Because why put an option in the game besides so that people use it?
I doubt they sat around considering weapons when they designed the critical hit rules.
I recall one of the WotC guys, I think it was Mearls, saying that the reason the rule worked like it did was to incentivize people playing barbarians that use axes because that's the archetypical D&D barbarian (see, as an example, the barbarian art in the PHB).