He is and was a COLLEGE PRESIDENT. His main job is and was to RAISE MONEY. To do this in NYC, he had to insult Ahmedinejad. Perhaps not to so great a degree. Ahmedinejad is less popular in Iran than he was when he was elected, because he has started to ration electricity and gasoline which is highly subsidized. Inflation in Iran is pretty high. He needs a scapegoat. Who better than the bossy Americans? So his being insulted and his off the wall comments also served him well.
It is a sure thing that homosexuals are far less apparent in Iran than in NYC. They mostly have the good sense to stay in the closet there. Whether there is the same percentage of gays in Iran as in the US is not ascertainable, becauswee the cultural attitudes are far different.