Sometimes it makes sense to quit while you are ahead. Jordan Belfort had an opportunity to step back and walk away from the negative company culture. He let the comradery and the instant gratification outweigh the right decision to let someone else take over as CEO.
Sometimes, the best choice is to take a step back. This could be due to personality clashes or you not being the right fit for the role any longer.