I renamed a zombie pigman egg and spawned it --it did get the name tag above its head but still despawned.
Couldn't find out if it is a feature or a bug.
just name a pigman spawn egg, spawn a pigman, and it should despawn
Linked issues
duplicates 1
Comments 4
See MC-54556
Were you playing on peaceful? In that case the zombie is supposed to despawn immediatly.
Spawning named mobs worked for me on higher difficulty levels.