Remember the open mic gaff Obama made to the Russians a while back when he wanted Putin to know that he would have more flexibility after the election? We learned from that that Obama was merely trying to sound tough for the U.S. audience, but he didn't really mean it.
Something similar was going on with the negotiations with Iran. William A. Jacobson relays a story from the subscription only part of wsj.com. Apparently, Obama had not come clean with the American public about what was going on behind closed door with the Iranians. Jacobson came to this conclusion:
Now it’s all making sense. The Israelis saw Obama acting deceptively, hiding negotiations that would affect Israel’s existence, and giving away the store to the Iranians.
Netanyahu saw no choice but to go to Congress both through the Israeli ambassador and the speech to Congress, knowing that it would harm Israel with the administration.
This was not something done for election purposes.
Jacobson provides some lengthy excerpts from the WSJ article. See them at Obama furious Israel found out Iran nuke deal secrets and told Congress.