Immunity from prosecution creates incentive for politicians to break the law. If they are immune from prosecution, they have less incentive to obey the law like most average citizens they are supposed to represent. They are making laws for the rest of us to follow knowing they don't have to bother obeying themselves.
If the history of laws has shown anything, it's that they're meant to be broken. Criminals as a whole, either aren't thinking about the consequence of their crime, or have enough incentive to commit the crime that they will do it anyway. In either case, the crime is almost always predisposed, and immunity is only a benefit.