if fighter isn't allowed unique class abilities to let them excell at the things they're meant to be best at then why is the barbarian allowed to get rage, the druid get wildshape, the rogue get sneak attack and reliable talent, the sorcerer metamagic, the paladin get smites?
They do get unique abilities. They get proficiency in heavy armor which only one other class gets, they get action surge, they get fighting styles and some of those are unique to their class.
Barbarians don't get heavy armor proficiency, and if they get it through a feat they can't even use it without giving up on raging.
When it comes to class specifically, fighter gets the most in terms of combat with weapons.
as you yourself noted there are other classes that have access to martial weapons and heavy armour,
There are not other "classes" that have access to that, it is a single class - Paladin.
As a class ONLY Paladin and Fighter have access to heavy armor and martial weapons. Even when you consider subclasses only a Paladin and Cleric have access to heavy armor and martial weapons and Clerics can't get extra attack at all.
So it is not "other classes" it is a single other class that gets that.
and several of those that don't get heavy get medium which is barely behind heavy for AC,
It is way behind if you are optimizing for melee. Half Plate with an average dex is a full 3 points behind Plate. If you got really bad rolls put a 7 in Dex it is 5 points behind.
You need at least a 14 Dexterity to be only "barely behind" a fighter. Your chance of rolling 3 or more 14s is 1 in 3 which means if you are optimizing for combat with the same rolls you will usually either have a lower constitution or a lower strength in order to get to that "barely behind". And even in that case where you got lucky and rolled 3 or more 14+ you are still behind ..... those great rolls get you to an AC "barely behind" a fighter, but still behind!
By contrast a fighter optimized for melee can actually put his worst ability in dexterity and come into the fight with better Wisdom, better charisma, better intelligence and still have a "barely better" AC than a character who does not have heavy armor proficiency.
It absolutely is when no other class gets that.having 2 more attacks, more options for fighting styles and high HP are not enough to stake a class's identity on and claim it is on equal footing with the others
When it comes to class and class alone, in terms of "equal footing", it is not equal at all, fighter is flat better at combat with weapons.