I think it is a combination of the limit of his power as the president of the country, and also Rouhani, in his heart of hearts, is not a democrat. He is a businessman. He's a pragmatic politician and as a pragmatist, he knows that respecting human rights, not persecuting different groups, including the Baha'is and Christians, is good for business. He's also a man who places his own self-interest above anything else, so while the judiciary, the guards, and the police are persecuting different groups, he's not going to say anything, because he doesn't want to jeopardize his own situation.
Essentially, what happened in 2013 during the presidential elections was a referendum for the nuclear negotiations. People voted for Rouhani because they did not want to be a pariah state much longer, and Rouhani presented the best way out of the nuclear impasse.