The cast of HBO's "Silicon Valley." HBO On Sunday night, a new episode of HBO's "Silicon Valley" highlighted a very pressing issue faced by plenty of real-world startups as they struggle to stay alive long enough to find a business model that actually works.

Here's a longer, funnier story made short.

(No, seriously, you should probably go watch "Silicon Valley" first, as this will make it sound like a super-serious business drama, which it definitely is not.)

Anyway, in the latest episode, titled "Two in the Hand," Pied Piper founder and CTO Richard Hendricks sees the company and its data-compression algorithm as a kind of one-in-a-million chance to actually change the world. He wants to give the Pied Piper technology away free and turn users into paying customers later, likening his strategy to that of Dropbox.

But CEO Jack "Action" Barker, a veteran businessman installed by the company's board of directors, is more focused on the company's valuation and cash flow. He wants to sell the product directly to big businesses, and soon. And he's willing to ruthlessly cut features from the product if it will make it easier to explain and faster to sell.

Baker says:

Pied Piper's product is its stock. Whatever makes the value of the stock go up is what we are going to make. Maybe sometime in the future we can change the world and perform miracles and all of that stuff. I hope we do. But like I told you before, I am not going to mortgage the present for that.

So here's the tricky part, in the show and in real life: Both the engineering-driven Hendricks and the more business-minded Baker are correct.

The case for the enterprise

To use the show's own example, just look at Dropbox. The file-sharing startup boasts 500 million users, with 1.2 billion files uploaded each day.

But some industry observers wonder whether Dropbox will be able to turn that huge adoption into revenue — whether consumers will ever spend enough on upgrading their Dropbox storage past the free plan to justify the company's $10 billion valuation. Indeed, the graveyards of tech are full of startups that tried to give their product away free and then found they couldn't monetize.

Dropbox CEO Drew Houston. Ramsey Cardy/SPORTSFILE via Getty Images

To plug that gap, Dropbox has spent much of the past few years building out its enterprise product for big businesses. Unlike consumers, enterprises buy in bulk and will often accept a long-term, multiyear contract in exchange for some kind of discount.

To take it back to the show, this means the business-focused Baker is right. If you want to make a lot of money really quickly, building a successful product for business customers is a great way to do it. It is telling that the chat startup Slack, the fastest company to ever reach a $1 billion valuation, is focused on the workplace.

Business is hard

The problem is that building enterprise software is really difficult. Corporate IT departments won't approve any purchase unless the product meets extremely exacting criteria around security, reliability, and ability to fit into existing infrastructure.

Furthermore, they want all purchases to come from a vendor they trust. After all, customers who are signing multiyear contracts want to make sure that a startup won't expire before the deal does. Combined, all of this means that enterprises can take months, or even years, to decide to buy a new piece of technology.

Even the beloved Dropbox is under a ton of scrutiny on whether it can make a dent in enterprise, and an inability to do so would be a huge indictment of its whole business.

GitHub cofounder and CEO Chris Wanstrath Flickr/by DaveFayram

But as Hendricks finds out on Sunday's episode, focusing on the enterprise means sacrificing a certain ability to stay on the bleeding edge.

As an engineer, it means solving hard problems, sure, but not problems that are exciting to anybody outside the CIO's office. In the show, focusing on the enterprise means not building cool features like Pied Piper's neural net and artificial intelligence, instead building in extra security and data isolation. It deflates Hendricks and his team.

Back in reality, the $2 billion startup GitHub found that going after the enterprise required an uncomfortable focus on suits, ties, and building a professional sales team, which stood in opposition to its hoodies-and-sneakers roots. A bunch of GitHub executives ultimately left, and the company changed course back to focusing on its more grassroots community of users.

The case against both

In the long run, consumer companies generally have a higher value, simply by virtue of reaching more users. Pied Piper, in the show, has the potential to save bandwidth and data-storage costs for people all over the world.

It is definitely possible to generate lots of revenue from consumers — look at Apple, Google, and Facebook — but it's really quite difficult. Consumers are notoriously fickle, and a service (Snapchat) or product (iPhone) that's hot today could very well be a bust tomorrow.

Snapchat tries to draw in new users with a billboard ad campaign. Snapchat

Similarly, enterprise startups are never a sure thing either. Even if you build an enterprise technology that businesses actually love, it's no indicator that it will last forever. Just look at BlackBerry, which got flattened by the iPhone.

And so Baker and Hendricks are both a little right and a little wrong.

The enterprise is a great way to make money, but it carries an extremely difficult set of challenges for little glory. And going after consumers is exciting and can potentially change the world, but it is also really hard to make money that way. There's no magic formula in the tech business.