Imagine for a moment that you're the founder of a super-hot startup, weighing takeover bids from some of the world's high-powered tech firms.

What exactly would you want -- other than, obviously, the oodles of cash, stock and glory that might be coming your way?

That hypothetical came into focus this week when the co-founders of Instagram announced that they were quitting Facebook, which bought Instagram in 2012. Instagram was already a popular photo-sharing app when Facebook Inc. (FB) - Get Report snapped it up for $1 billion, but it's since become the golden child of Facebook's portfolio: a phenomenon for users, a gold mine for advertiser dollars, and seemingly insulated by the scandals that have plagued Facebook over the past year. With over a billion users, Instagram will generate $10.9 billion in revenue in 2019, according to an eMarketer estimate.

Still, Instagram founders Kevin Systrom and Mike Krieger (who served as CEO and CTO, respectively) reportedly butted heads with Facebook management over the direction of Instagram.

In a blog post, Systrom wrote that the two are "leaving Instagram to explore our curiosity and creativity again."

The visions of Facebook and Instagram's founders ultimately got out of synch.

A similar circumstance took place a few months ago in April, when the founders of WhatsApp, Jan Koum and Brian Acton, abruptly left Facebook (and reportedly, hundreds of millions in unvested stock) stemming in part from disagreements over encryption and privacy.

To be clear, it is not uncommon for founders to eventually leave a parent company after their business is acquired. But the high-profile departure of the two Instagram founders sheds light on the often-complicated calculus involved in selling a popular startup to a bigger behemoth.

Hale Boggs, a partner at Manatt, Phelps & Phillips specializing in M&A, said that in most transactions, founders don't necessarily have a ton of leverage. "It's the golden rule: Whomever has the gold, makes the rules," he said.

In venture capital circles, 'founder-friendliness' refers, broadly speaking, to a willingness to defer to the founder's vision in guiding a startup. In mergers -- specifically in circumstances where a visionary founder is courted for his or her unique attributes, or that of their business -- factors other than money can come into play.

"Do you have a shared vision of where you see the target company going in the future? Is the brand as it exists something that the acquirer would envision retaining, or is it more likely something that they would fold into their brand?" Boggs cited as examples.

Jamie Siminoff, founder of smart home device maker Ring, recently gave a glimpse into why his company decided to move forward with a takeover bid from Inc. (AMZN) - Get Report . (The e-commerce and cloud giant acquired Ring for a reported $1.2 billion in April 2018.)

"The biggest thing was seeing that they had bought into the mission," Siminoff said. "When we started really talking seriously, we were doing really well, but they were focused on the why, not the output of that."

Siminoff added that being able to continue the existing work he was doing, albeit with far more resources, was also a selling point. He mentioned that they also had held discussions with Apple Inc. (AAPL) - Get Report and others, though those talks never got serious. 

Greg Schott, founder of Mulesoft, described a similar alignment in speaking of his company's $6.5 billion-acquisition by Salesforce in May 2018. 

"When [Salesforce co-CEO Marc Benioff] and I met back in February...he said we're starting to see digital transformation as an industry, and I said that we see ourselves as the engine of that industry," Schott told a group of investors at the Dreamforce conference this week. "Putting the companies together felt like a really amazing strategic fit."

Salesforce, in particular, has swiftly assimilated some of its recent acquisitions into its product suite: Schott's Mulesoft has already been integrated into Salesforce's cloud apps, just a few short months after closing. 

As for what founders really want, there isn't necessarily a common denominator -- other than compensation, of course. But Boggs added that in Silicon Valley, there are a few recognizable trends. 

"There are founders who would consider themselves serial entrepreneurs; their whole mission is to spawn companies, sell companies and move on to the next company," he said. "With [others], it's their baby and their life's work, so in that context even the notion of selling is really difficult. But if they get to that place -- usually financially motivated or the ability to leverage bigger resources -- they might want to be more selective about the buyer."

Ultimately in Instagram's case, the founders' vision may not have been compatible with Facebook's.

"Building new things requires that we step back, understand what inspires us and match that with what the world needs; that's what we plan to do," Systrom wrote in his farewell post. 

As they say, on to the next one.

Facebook, Apple and Amazon are holdings in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells FB, AAPL and AMZN? Learn more now.