Does Yellen have some professional ethics that guard against her acting in a way that overly favors businesses that have her millions of dollars? I think she does. Are those ethics effective as a guard against corruption in the same way that, well, not taking millions of dollars would be? I doubt it. Money talks.
Maybe even more importantly, it severely hurts the legitimacy of government. How are you supposed to convince people you're on their side if you're making millions from the other side? If your lawyer was getting paid more than you could ever pay to share his wisdom with the other side over a fancy lunch, and then you lost the case, you would have every right to doubt their integrity--even if they had done nothing wrong.
The US would have would have a lot less problems with conservative populism if the centrist technocratic impulse wasn't so often so tone deaf.