Those people who care about hypocrisy in our elected officials - and their acts - will withdraw their support from him/her and s/he therefore loses the ability to do further harm.
I think that in some cases you are right. The offending legislator would be voted out of office because of the scandal.
But then we have to take into consideration the Marion Barry syndrome. You get caught red-handed doing drugs with a prostitute, and your constituents decide that you have done some much good as an elected official, that it out-weighs the scandal and they elect you back into office.
Another thing to consider is that regardless of any hypocrisy we might perceive, there might be people in the constituency of the legislator in question who would agree that whatever vote he made was the right choice.
Yet another possible outcome is that homophobes might look at a political outing and be affirmed by the whole thing. As if to say that being gay is so bad that the politician needed to hide it. Moreover, that gays themselves are so bad that they would throw one of their own under the bus. The lack of unity expressed via hypocritical legislation and the subsequent outing, could fuel the negative opinions of homophobes. Although I must say that I am for less concerned about this outcome.
So overall, I think that outing such a politician is only effective in some cases as a tool to remove him from public office.