The gemara questions whether a husband has the right to keep a wife who is "עוברת על דת" and tries to prove it from the mishna that says when the husband is unable to do kinuy the beis din will to it for him. Now, if the husband has the prerogative to keep her even if she is acting improperly then how can the beis din determine that he would want to do kinuy and act as his agent, maybe he would be willing to keep her. Rashi explains that the question of the gemara is based on the concept of אין חבין לאדם שלא בפניו and he may not want the kinuy. To that the gemara says that since most people want it we assume it is a zechus.
The next gemara questions whether a husband can be mochel on his kinuy. The gemara tries to prove it from the same case in the mishna where the beis din will do kinuy for the husband when he is unable to do it. If the husband has the right to be mochel, how can the beis din give kinuy in his absence since he may not want the kinuy at all. At this point rashi cannot explain as he did earlier that the question of the gemara is based on the concept of אין חבין לאדם שלא בפניו because the logic would be exactly the opposite. Meaning, since the husband has the ability to be mochel the kinuy, the beis din should be able to serve as his agent since it is an absolute zechus because if later he comes and decides that the didn't want it he can be mochel at that point. Therefore, rashi assumes that the issur is not chov or zechus, rather the issue is that it will be degrading to the beis din if they do a kinuy today and tomorrow the ba'al shows up and is mochel on the kinuy. Therefore, if he has the option to be mochel they should never have the right to give the kinuy in the first place. To this the gemara answers that it is highly unlikely that he will be mochel since he will rely on the beis din.
The question is: The question of the gemara which according to rashi is based on זילותא דבי דינא assumes that we insist on the beis din to do the kinuy (which is the implication of the mishna) and do not let a private person do the kinuy. Why? Since kinuy is dependent on the concept of זכין לאדם שלא בפניו as indicated by rashi, why would a beis din have to do it? Shouldn't a friend of the husband also be able to serve as the agent to give kinuy to his wife? Perhaps we only consider it a zechus if the beis din properly asseses the situation to be one where a stam person would want to do a kinuy, and only after that assessment is it considered to be a zechus for the husband. But if the assessment is made by just a friend of the husband, it will not be considered a zechus and he therefore cannot serve as his agent.