Don't freak out, Magician, you've just unlocked the multi-function setting on your hat.
Similar to auto-complete on a phone, this setting will allow your hat to deliver different potential matches to whatever spell you used to summon items from your magical hat. As always, can only take one item from the hat, but now the hat can give you multiple items to choose from. However, like all sentient magical items, this one has certain conditions.
Screaming, crying, attempting to kill the hat with fire, and indeed any damage to the tentacles will deactivate the multi-function setting. This will cause the hat to return to normal, and as always good luck sticking your hand in there and finding what you need.