It only encourages the bad behavior when they allow it to continue, so they should leave if they are being mistreated. It is unlikely that many reporters will do anything to discourage rude behavior or even mistreatment by a celebrity however as that would cost them money and it would cost their show and channel ratings.
A reporter who is being treated rudely by a celebrity has every right to leave. Although most would no doubt choose to stay, it would be admirable if a reporter decided not to stay. It would give a positive indication of their self esteem and would send the celebrity a message that their behavior is unacceptable.
Interviews can often turn hostile, whether instigated by the interviewer or the interviewee. While some reporters do provoke celebrities into rude or hostile behavior, celebrities can often instigate it as well. If this is the case, the interviewer should certainly have the option to leave the interview if they begin to feel it is getting too hostile.
Regardless of the behaviour of the person being interviewed, the conversation should reflect the truth. Just because it may not be flattering when it lands up in front, doesn't mean that it shouldn't be completed. I had read many interviews that stated that the person being interviewed was difficult, and yet relevant information was gleaned from it. Sometimes the interviewee isn't even being rude, it's just that they don't want to be there in the first place.