Some items, when renamed in the anvil, placed in the world and picked back up by the player, their name is gone.
In the attached video, you can see this happens for a bed.
I have tested a few more items, and I don't expect this to work for every single one of them. What I tested:
Items which do retain their name:
Banner
Chest
Shulker box
Minecart
Bucket with any fish
Banner pattern (when used in the loom)
Music disc (when used in the jukebox)
Eye of ender (when used to locate the stronghold)
Item which do not retain their name:
Rail
Jungle door
Spruce sign
Beehive (with and without bees inside)
Grass block
Dirt
Slime block
Red carpet
Crafting table
Rose bush
Zombie head
Lantern
Anvil
Red tulip
Blue bed
Ender chest
Spruce boat
Beacon
I think you should be able to rename your bed and beacon and retain their name. Especially the beacon, so you always know whose it is, like people also do with their armor on multiplayer servers. (Chests and shulker boxes do retain their name.)
I also think it is weird that a minecart does retain their name, but a boat does not. These are both quite similar in use. I believe they both should either retain (or not) their name.
For the other items which I tested and don't retain their name, I don't think they need to retain their name. Altough it would be fun if even dirt blocks would retain their name, I don't think this would be intended.
Related issues
Attachments
Comments

Thank you for your report!
We're actually already tracking this issue in MC-209, so I resolved and linked this ticket as a duplicate.
However, that ticket has already been resolved. That means that this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki