Depends on the Time Scale
Are we talking secrecy over the course of years or decades, or are we talking a multi-generational conspiracy? On the scale of decades, fear for themselves and their loved ones is sufficient. Even if this conspiracy is powerful, unless it could stop the nation-states in which it is operating from squashing it once found out, there's always the risk that they could be hauled off to jail (or executed for treason, depending on what your secret society is up to) along with their friends and family. If there is no such risk, what is the point of all the secrecy? Nefarious organizations that operate with the blessing of the nations states in which they operate tend to do so openly, no matter what the general populace thinks of them (lobbying firms in the US, for instance).
In the short term greed can be effective as well, but it can also be a liability if the rewards gained or losses avoided by selling out their conspirators exceed the benefits of cooperating. Conspiracies built purely around greed (such as the LCD price fixing scheme that ran from 1999 to 2006) tend not to survive for long, as once found out, those involved tend to turn on each other pretty quickly.
On a multi-generational scale, the probability of a large monolithic conspiracy remaining hidden drops precipitously. On long time-scales your conspiracy's inner circle will need to recruit new members over and over again (with the perpetual risk of betrayal), and unless your conspirators are immortal, eventually they're going grow old and die. If what they're doing is unethical enough that it needs to be kept secret, there's always the risk of a last minute attack of conscience. At that point they have nothing left to gain or lose personally. Unless there's someone else involved in the conspiracy that they care about and want to protect, there's little that anyone could hold over their heads (and even then, they could try to strike a plea deal on their behalf). This also means that eventually the founders will be completely replaced, and the new guard may not be as committed or competent as their predecessors (their goals may also drift over time).
That's in addition to members who decide they want out for personal reasons, members who get caught doing something unrelated (tax fraud as the most typical example) that draws attention to their other activities, or just a janitor or night watchman stumbling on something incriminating (that's how Operation Snow White and Watergate were revealed). The risk of any individual breach may be small, but over time the risks add up.
On the other hand, the secret organization may survive by devolving into a glorified country club, with all the secrecy and subterfuge intact (for fun), but with nothing of value to hide. Even if discovered, such an organization would probably not disband, though it would cease to be a true "secret organization".
Cellular Structure
One way to sidestep the scale issue would be to divide your large secret organization into several smaller secret organizations that each know almost nothing about one another besides their points of contact. This is how some terrorist organizations and organized crime syndicates work. When a portion of the conspiracy is revealed, everyone in that cell may be hauled off to jail, but the remainder of the conspirators rebuild and keep going. The downside is that this won't really be a "secret" organization for long, any more than Al-Qaeda or MS-13 are. The precise inner workings may be a secret, but even ordinary people would be well aware of their existence and goals.