Why tie beam / patli is provided in wall?

I have this question in my mind from a long time.

I seen a tie beam / patli casted at mid height of wall at some project and at some projects walls made without putting patli.

Can anyone help me on, why tie beam patli provided in wall?