The Sun Mansion had always treated its servants rather kindly over the generations. As long as you followed the rules, worked hard, and did not have dubious intentions or commit crimes, the treatment you received was not bad. Even if you were a bond servant, after ten or eight years of service, they would still pay you a wage. When you had saved enough money and said you wanted to leave, Mr. Sun would even provide severance pay to help you start your own business afterwards.
At that time, for a rich family to behave in such a way was considered very benevolent... There were plenty of others who treated their servants like animals, beating and torturing them to death and then burying them without a second thought—as long as the indenture contract was in place, the officials wouldn't interfere.
Therefore, it made sense that the Sun family could wield such influence in Hangzhou. It was these small, accumulated details that slowly built their reputation.