It was a sleazy, cover-your-@ss attempt by the president to somehow undo a bad mistake, and it didn't work.
I think you can legitimally invite people to speak who hold entirely different points of view than yours or the country’s, even offensive views. But that person has to have the ability to listen and reason, as well as speak. It needs to have the result of having been a two-way exchange. Ahmadinejad harangues. I’ve never seen evidence of any ability to listen and negotiate. Plus, he’s an enemy of the United States in an active war.