Well then what purpose does the halfling ability serve in your game?
Again, I am not saying anyone forgets they exist or doesn't keep an eye out for them, so let's leave that for someone else.
Why is it so wrong in your opinion that someone popping out from behind someone, even though you know they are there, has an advantage in hitting versus someone who is shooting from out in the open? The target knows they are behind someone, but doesn't don't know which point their attack will come from (left or right or even between the legs of the cover, up or middle or down) in the same way you would if they were out in the open. Why is it so weird to you that it provides some mechanical benefit in the odds of hitting their target, while not being about "forgetting they exist" or "keeping an eye out for them"?
Escaping pursuit, mostly. Not every racial ability is particularly useful in combat. In combat it would be useful once or twice, but if you use it in the stupidest way you can imagine, it's probably not going to work very well.
Look, here's the thing about hiding. When you attack from hiding, you have to reveal yourself. You're allowed to fire a ranged weapon and still gain the "unseen attacker" benefit if you're hiding, but it's assumed that if you're going to make a melee attack that you
lose that benefit because it takes too much time to walk out from your hiding spot and make an attack. The game doesn't seem to care if you only have to step 5 feet out of hiding to make a melee attack, either. Moving out of hiding to make a melee attack means you don't get the "unseen attacker" benefit, but popping out and shooting a ranged weapon really quickly does.
So, the game is already drawing pretty strict limits on how hiding can work while benefiting as an "unseen attacker".
Further, unlike actual invisibility, you're not completely unpredictable. You
are visible when you shoot from hiding. It spoils your hide. The idea is that they see you, but there just isn't time for them to react because missile weapons are so fast.
So, think about this logically. The hiding character who shoots a ranged weapon, the reasoning goes, has just enough time to benefit from being "unseen". If you were to even do more than quickly draw and fire -- even simply taking a few steps -- and you'd spoil that benefit because you're spoiling your hiding. So, what happens when the NPCs can
reasonably assume that you will be popping out in the next few seconds and firing from exactly where you were only moments before after already having done so more than once immediately before? It kind of stops being reasonable that your attack from hiding can still benefit from being "unseen". You're "hiding" in as much as you're trying to be quiet and unseen, but you're certainly not "hiding" in the sense that your location is unknown. You're not even hiding in the sense that where you'll be attacking from for the next round are unknown!
The barbarian your halfling is hiding behind is standing by himself in the middle of an open room. Every orc fighting here saw this halfling "disappear" behind the barbarian 12 seconds ago, then pop out and fire their bow. Then the halfling did it again 6 seconds later. Now the halfling is "hiding" again. Is it really going to
still be unexpected? These orcs are now very aware that the halfling is planning to poke out and fire. Can you still really be considered "unseen"? They know where you are. They know what you're planning to do. You've already got a fraction of a fraction of a second according to the game rules as it is because of the restriction that hiding attacks only work with ranged weapons. Sure, sure, the barbarian is distracting. But he isn't so distracting that, say, the gnome wizard's firebolt from 60 feet away should get advantage. The orcs are able to pay enough attention to that to not grant the wizard advantage.
That's what I mean by straining credulity beyond the breaking point. It's no longer reasonable that you're actually hiding in any realistic sense of the term.
Sure, it makes sense if there's several PCs or a lot of objects to hide behind that if you're moving quietly or moving around that your attacks will remain unpredictable enough to benefit. But if the barbarian is the only thing to hide behind and you keep ducking behind them, it doesn't really matter if sometimes you go left and sometimes you go right. It's just not unpredictable enough anymore.