Well, it depends.
I'm really a huge fan of random items, the same as I'm a fan of random monsters. Recently, I prerolled a random encounter with a troll, and in it's lair the party randomly found an instrument of the bards, and ivory goats. We actually have a bard in the party, so that instrument is a huge boost to his capabilities (5th level characters). We distributed the three goats amongst party members, and we'll have to see when they come up in play.
We also have found two +1 shields so far. I rolled up some of the fun little features in the DMG and gave each of them a name. Literally nobody in the party uses a shield. Of the two-characters with proficiency, one is a dedicated dual-wielder, and the other is a caster who doesn't want to tie up his casting hand, and dislikes shields for style. That said, that same character has been wearing one of the shields on his back during non-combat travel on the Isle of Dread, because its special minor property eliminates the discomfort of environmental heat or cold.
So, as a general rule, you use what you get.
But at the same time, the party has found themselves in Sigil in the past, and will find themselves there again later likely. They can buy/sell/trade for items there (I increase the prices for most magic items considerably over what 5e recommends, though prices aren't as inflated in Sigil). I use a lot of random rolls to determine what any individual magical shop has available. If it's not available, you might be able to get someone to acquire it for you at a steeper cost. That's why the party has multiple bags of holding now--each one of them with a different appearance. In some place like Waterdeep a magic shop (by which I mean the place wizards buy all of that stuff they need like spellbooks, special inks, spell components, etc, as well as some scrolls and potions) will likely have a very small number of magic items they happen to have acquired. A high-end weapon or armor shop might feature one or two sets of magic armor they got somewhere and would be willing to sell for a high price. You could try to have someone find the item you're looking for for you, but it's going to be harder than out on the planes. It might be easier to get a divination of some sort telling you where one of the item you are looking for might be found, and then go adventure for it!
When it comes to pre-made adventures, they get whatever is in the adventure (though I divide all treasure by half or more because we have a slower advancement). If I make an adventure, I'll put in whatever seems appropriate for the context, which almost certainly involves random rolls.