In such a situation, the party as a whole would be harmed because its “brand” would be tarnished and it would become less popular with the voters. However, it is not at all clear that there is much that parties can do to “monitor” their members who are in office.
Political parties depend very greatly on their popular image. We tend to have perceptions of what the parties stand for that help us to determine which party we are going to prefer. In the case that you describe, these images could be badly hurt. There are those who argue that this is happening to the Republican Party right now.
There are some who argue that the Republican office holders are making the party look bad. Their attitudes towards things like immigration are said to make them look bad in the eyes of Hispanics. Their attitudes towards things like gay rights are said to make them look bad in the eyes of younger voters.
Arguably, these things are caused by a failure on the part of the party to “monitor” and influence what the officials are doing. Because the officials are taking these positions they make the Republicans look bad and make it (arguably) harder for the Republican Party as a whole to regain credibility with American voters.