From a purely gameplay design standpoint, "ammo" for a gun and "durability" for a melee weapon are the exact same thing. That mechanic is there to limit how much the player uses their weapons, often done to push the player into trying everything in their arsenal and not just rely on one thing they're comfortable with.
But while "ammo" is perfectly accepted as a mechanic, if gamers see "durability" they freak out and complain.
To me, the difference between the two mechanics is the ability to Recharge a pet weapon.
With ammo, if I find 5 ammo in a trashcan, I can suddenly use my favorite gun 5 more times, unless I'm already capped on ammo. And, if I'm out of ammo, all I have to do is find any amount of ammo to be able to use the gun again.
Whereas, most weapon durability systems (in my experience) make that durability loss permanent - I can't find +3 swings to my magic sword in the trash, and if my sword breaks, more often than not, I have to Go Out and Find or Buy Another - which if it's Rare/Powerful, then durability represents a Finite Number of uses EVER. Imagine a character throwing away a gun just because it ran out of ammo.
To me, a better comparison for ammo would be Monster Hunter's sharpness system - finding ammo and sharpening a weapon are downtime activities that the player engages with to keep up on their damage output during a longer scenario that, if not kept up with, can put the player in a really rough spot.
You're describing how the two can feel different emotionally, but mechanically they still serve the same purposes.
Imagine a character throwing away a gun just because it ran out of ammo.
I have seen countless FPS where you do literally that though, especially in the mid-2000s after everyone copied Halo for only letting you carry two guns at once. A gun only functions if there's ammo in it. An empty gun is as useless as a broken sword waiting to be repaired.
There's plenty of games where melee weapons can be repaired and restored to full durability by spending a ressource. The last few Resident Evil games have a system where you craft ammo by using gunpowder. In other words you could say you are restoring your guns to full usability by spending a ressource.
Functionally these mechanics serve the same purpose, but the way they are each narratively dressed provokes different feelings.
Part of it is that the weapons don't usually degrade. Most often, they just suddenly stop working and it's done for. The reason most folks seldom complain about it in Fallout is that the weapons work worse if you don't maintain them. Guns included. So you get rewarded for managing your resources and using your skills with higher quality arms. However if we're talking the SaGa version it will always be hilarious when your foot runs out of ammo.
