Steps to reproduce
Spawn a mob using a spawn egg.
Travel far enough away that the mob is outside of simulation distance.
Travel back to the mob
Expected result
The mob is gone.
Actual result
The mob is still there.
So I was trying to make a witch farm and to figure out despawn mechanics. In my testing, I used a creeper spawn egg to test how far away I most be to have the farm work. I flew multiple chunks away (what would be more than enough to despawn a creeper) and came back to a still spawned creeper. This is back by how a cow that was near the creeper had despawned and the creeper had not. Please fix this. To other players please test this as well to confirm my suspicions.
Comments 2
Works as intended; see Mojang developer comment in MCPE-8080. The reason it's designed to work this way is that spawn eggs are meant for map designers to use to create traps and jump scares. If the monsters despawned before the player found them, there would be no point.
(BTW, a "monster egg" is different from a "spawn egg". A monster egg looks like a variant of stone and spawns a silverfish when you break it.)
Mobs spawned using spawn eggs automatically get persistence, so they will not despawn. I believe this is intended because spawning them with a spawn egg is considered a kind of player interaction, like trading, naming, tempting, breeding, etc.