Fifth Element said:
A randomly-determined item that is of no use to anyone in the party is a junk item
IMXP, this mostly happens when character abilities (or items abilities) are very narrow.
"I am optimized to fight 5-foot tall elves mounted on hippogriffs during the crepuscular hours of every third tuesday in the Summer, so I cannot use this item that gives me a bonus to bohemian ear-spoon attacks vs. musky giants!"
Or, for a less absurd example: "I am a striker! What use do I have for something that heals people? That's not my job! It's a waste of an action for me!"
Or, "Oh. Great. A decanter of endless water. That'll come in so handy on this dungeon crawl where we don't track rations and fight goblins all day long."
Or, "Wow, if I wasn't an axe fighter, this magic sword would be useful!"
The solution is broader characters, broader items, and a broader game milieu. If, for instance, the game assumes a significant Exploration component, then a decanter of endless water becomes useful. If the game doesn't dictate roles, then healing is potentially useful for everyone. And if the game doesn't allow you to over-specialize in one narrow field of ability, you can make use of things that are outside of that field.
You want some specialization, of course. "Dude who is really good with one iconic weapon" is a D&D/heroic fantasy staple. What you don't want is specialization to eclipse magic. Okay, I'm at +1 to hit with my swords because I'm a sword guy, and this magic axe gives me +1 to hit with it (making it the equal of my sword) and ALSO +1d6 damage...axe clearly is not useless to me. And given that we'll only find, say, 10 magic items in the whole campaign, maybe I should become a sword guy who ALSO has a magic axe up his sleeve. Or maybe I should become an axe guy since I don't exist in a vacuum and this magic axe is sweet.
It's a fine hair to split, but it's likely possible. Part of the reason that happens in 3e and especially in 4e is because the game allows such dedicated specialization that things that would be useful in a broader game more easily fall into "not my bag" territory.
Ensuring that items are optional is actually a boon for this, too. There's no need of or promise for an upgrade for your rusty iron sword that you love so hard. You don't strictly need it. You won't get a replacement. You don't want to make use of the item you got? Mokay, but that's your choice. It's not the DM's problem that you don't like your shiny loot.