Implicit Power.
The distinction is in what the weapon actually IS. Remember, all weapons are tools, and many polearms are functional tools outside of combat as well. (Some are designed for combat, but many, like the guisarme, are just a long pole tool that proved to be shockingly effective in riot combat.) Polarms come with all sorts of useful steel tool heads, and their exact shape can be used to do all kinds of things other than killing a guy. Older editions, especially OD&D, focused very heavily on creative use of equipment because, for the most part, your equipment defined what your character could possibly do! 5e goes to great pains to emulate some of the finer elements of earlier editions, and this improvisation of environmental interaction is one of those things. As such, having many structural variations of mechanically identical objects is actually of great benefit to the players, as such tools provide a wide variety of implicit functions on top of their explicit "crack their skull open" properties. Essentially, these weapons are not just valuable two-handed weight that deals damage in absolute abstraction. A glaive can do everything that can be imagined for a real glaive to do, because it represents a real glaive, and the same can be said of the halberd.
Using Your Imagination
If you're having trouble understanding how a weapon, particularly various polearms like the glaive and halberd, can be used outside of their written properties, read on.
Implicit power is where logic and creativity combine to give game elements more functions, powers, and effects than they were written with. We use this all the time when we make assumptions about elements in the game environment. (Like gravity pulling down. Never stated in the rules, but it must be true for the game to work. Or your human having two eyes, it's an assumption we make because we are humans who have two eyes, but again it isn't written anywhere to be true of our characters.) This kind of thing is necessary in order for the game to function at all. We assume that the game elements are representations of real things. Implicit power is the creative use of these necessary assumptions.
In the context of this question, let's use the example of the glaive and halberd. Simply looking at their structure, we can see why they wound up with identical combat stats: a ~2m pole with an all-metal striking head, with a bladed face, a stabby top, and usually a spike out the back. (There are examples of both which lack this hook/pick feature) The only difference is the arrangement of those properties; its physical shape. What can you use these tools to do, other than kill stuff by hitting them directly?
As polearms, they can of course be used to check for traps, as with any long pole-like object. With a metal head though, you're less likely to lose length from minor things like a bear-trap or the like, and localized spontaneous heat sources will just heat the head, not set the entire shaft aflame. Similarly, as poles, they can also be used to prop things against each other, like jamming a door which lacks a lock by propping its handle against the stonework of the floor, or propping two slowly closing walls (or a slowly closing ceiling) against opposing surfaces to buy yourself some time to get out. You can use them to bar a door, if the door's closure mechanism can be barred. In shallow waters on a small boat or raft, you can use it to propel yourself via punting. You can also use poles to safely smash out a pane of glass, allowing safe access through a window or other such portal.
A halberd has a non-bladed tine protruding from the top. This means the end of the halberd can be used to dangle or lift things, (or people) without accidentally slicing a strap, (or someone's hand) or to reach into tiny holes, such as to plug the source of poisonous gas in a dungeon trap, or to stab someone spying on you in the eye through a peep-hole. The glaive can not to these things, as it is too broad and, (aside from the back edge usually) entirely bladed.
Assuming either weapon has a rear spike, these can of course be used to hook just about anything in the environment. You can use it to grab objects or flip switches that are out of reach, or to pull down tree branches. You can hook it to an environmental feature and then climb up the dangling pole like a short grappling hook. The glaive has a shockingly wide variety of forms that this spike could take. In some cases it was a hook, like the halberd, but in many cases it took the form of a fork, intended to catch weapons and wrench them from someone's hand, or a long tine meant to turn a swinging strike into concentrated piercing force. This means that, depending on the shape of such a spike, if your glaive has one, it can provide alternate functions. A fork, for example, could be used as a hanger, such as for a lamp, allowing you to carry your light source and a weapon at the same time.
You can attach things to your weapons too. Like, for example, a flag. Or your possessions in a sling. Or a bottle full of alchemist's fire, so when you hit something the bottle smashes open and makes a huge flaming mess. You could use your halberd to frighten enemies by putting the severed head of one of their fallen comrades on the spike of your weapon. Enchanted items which generate effects just from being carried can be tied to your weapons in various ways as ornaments, to save room in your pack, while still benefiting from their effects.
Both weapons are bladed, as mentioned before, so you can of course use these to cut pretty much anything in the environment. In particular, you can use them to cut ropes, like those of a rope bridge, or the rope which suspends a chandelier. And as a reach weapon, they can cut such things from 10 feet away, so even if it would normally be safely out of reach, this weapon can totally change that situation! You could slice down an overhanging tree branch to drop it on an enemy, or to create a spot of difficult terrain! On a ship, you could slash off lines which are part of the upper rigging, like chopping down a jacob's ladder that someone is trying to climb to escape you, above where they've climbed to! Obviously, the glaive would be better at this, because it doesn't have an awkward unbladed spike sticking out the top.
There's definitely more that you can do with these things. It just comes down to being creative and picking your situations.