Well, the answer to that question is rather simple — iambic pentameter is an iambic rhythm meter; and its purpose is to keep an “ear-pleasing” rhythm. Don't get hung up on pentameter, iambs can be used in a variety of different ways.
Why is iambic pentameter effective?
It's a comfortable, natural speaking cadence.
We tend to alternate stressed and unstressed syllables in conversation. ... “You have to write in a rhythmic way because human speech is rhythmic,” Mamet says. Playwrights reach for iambic pentameter because when people speak, they're creating a sort of rhythmic poetry.
Why are poems written in iambic pentameter?
Iambic Pentameter originated as an attempt to develop a meter for the English language legitimizing English as an alternative and equal to Latin (as a language also capable of great poetry and literature).