While it can be tough to work under a bad manager, negative experiences often teach professionals how they can be better leaders for others as their careers advance.