When an item's PickupDelay tag is -1, players can never pickup it. But hoppers can always pickup the item and ignore the tag.
Use /summon minecraft:item ~ ~ ~ {Item: {id: "diamond", count: 1}, PickupDelay: -1} to summon a diamond, but you cannot pickup it.
Now place a hopper and stand on it.
Use the same command again.
Check the hopper whether there is a diamond in it.
This ticket duplicates MC-125496