They don't "commit suicide" on purpose, they just have next to no AI to prevent themselves from getting hurt/killed. They randomly walk/jump around, and run away in the opposite direction for a few seconds after being hit. That's pretty much all the AI Mojang gave to the passive mobs.
Thankfully, they hired a AI programmer awhile ago and are slowly improving all the mobs.
Proof:
I wonder why they do.
You'll can discuss on what your opinion of this is.
Oh, and i was in my mob looter for food.
Edit: more proof.
If you want me to respond to you, reply to me with the "Quote" button under my post.
And thats why they commit suicide.
Thankfully, they hired a AI programmer awhile ago and are slowly improving all the mobs.
That means no more infinite cooked pork.