I spawned a bunch of creepers in the morning and locked them all inside a "creeper pen" I made. And then when night falls only 4 out of the 20+ in the pen were remaining. So where did they go? How could they get out when there was no exit in the pen for them? I don't understand??!!
Monsters can despawn if you get too far away.
Only hostile mobs, squid, and ocelots can despawn as of 1.2.3