Ineffective managers can provide valuable lessons on how to become a better leader, even if their behavior is undesirable.