When you put an item in an anvil (provided you have enough experience) you can re-name that item. Usually this is used for nametags and equipment, but can be used for anything.
I recently used this to name a stone brick block (for bit of fun), but when I placed it down, the name was not visible. I picked it back up again, and it still had the same name, so why is it not showing when I place it down?