Comcast (NASDAQ:CMCSA) and Netflix (NASDAQ:NFLX) are a little bit rivals and a little bit partners.

It's a contentious relationship since the streaming service fought to scuttle the cable company's deal to buy Time Warner Cable and the two companies have differing opinions as to exactly how open the Internet should be. But as much as Comcast and Netflix seem to be at odds with each other, they also work together, sometimes even by choice.

For Netflix, dealing with Comcast is a necessary evil. The cable and Internet giant controls the pipeline to people's homes, and the streaming leader needs that pipe to deliver its service well enough to support a high-quality experience for viewers. Comcast also owns a lot of content through NBC and its various cable channels, and Netflix needs that as well.

For Comcast, even though Netflix is in some cases stealing cable customers, the cable and Internet company needs the streaming service to succeed. It may seem paradoxical for one company to wish success on a rival that's slowly killing a major part of its business, but for Comcast to continue to thrive in other areas it needs a healthy Netflix.

Comcast gets to double dip
Although it was a deal that Netflix had hoped to avoid and went into while publicly objecting to the market conditions that it believed Comcast had created to force its hand, the streaming company does pay the Internet giant for direct interconnection. The streaming leader essentially had to make the deal or risk its customers leaving due to it not being able to deliver a decent experience for subscribers. Quartz explained how it went down in a 2014 feature story that detailed the entire process:

Despite purchasing transit on all available routes into Comcast's network that did not require direct or indirect payment of an access fee to Comcast, the viewing quality of Netflix's service reached near-VHS quality levels. Faced with such severe degradation of its streaming video service, Netflix began to negotiate for paid access to connect with Comcast. Netflix and Comcast eventually reached a paid agreement. Within a week of that agreement, viewing quality for Netflix streaming video on Comcast's network shot back up to HD-quality levels. 

This deal essentially allows Comcast to double dip. It sells Internet access to customers and gets paid by one of the services they use on the connection they have already paid for. It's not the most important reason Comcast needs Netflix, but it's a nice bonus.

Why does Comcast really need Netflix?
Comcast, through NBC, its various cable networks, and its movie and television production studios, owns a lot of content. Because it has ownership of a variety of distribution channels including its TV networks and a share of Hulu, it has generally been able to serve as its own distributor.

But there is reason to think that may change in the future and that Netflix will become a much more important partner. Given the declining importance of DVD sales for television shows and movies, getting paid after a network or theatrical run increasingly involves making a deal with the streaming leader. Hulu is, of course an option, as is Amazon's Prime Video service, but the first is tony compared to Netflix and the second is very careful with its content budget.

Hulu has about 9 million subscribers to Netflix's 41 million paying customers, The New York Times reported in September. That disparity means that Hulu simply has less money to spend on both original content and on rights to already aired shows. Yes, the company sometimes breaks the bank strategically as it did for Seinfeld reruns, but those moves are few and far between. The same can be said of Prime, which has a major deal with HBO, but is otherwise tight with the purse strings given that its service is a free add-on for its $99-a-year shipping service.

In addition, the changing nature of television viewing suggests that NBC and its related cable networks will not always be the best places for the company to air some of the programming it creates. One example of that is Unbreakable Kimmy Schmidt, which is produced by a Comcast-owned studio. It was originally picked up by NBC before the company decided to license it to Netflix.

On the network, Kimmy Schmidt would have been, at best, a struggling prestige show like its co-creator Tina Fey's 30 Rock was for years. At worst, it would have been canceled quickly. On Netflix, which does not release viewership numbers, it brings prestige and an audience. Because of that, the show was given a two-season order off the bat and it seems likely to have a long run without the perpetual threat of cancellation.

Netflix requires good Internet
Comcast is the largest Internet provider in the country, and even in the markets where it has rivals, in many cases the opposition is a slower, phone-company DSL. That type of service is fine for Web browsing and some video watching, but it's not ideal when multiple people in a home are watching Netflix, especially if it's on a big screen in HD.

As you can see on the chart below, Comcast is not the fastest ISP for watching Netflix, but its speed of 3.51 Mbps is essentially the same as the 3.67 Cox posted to take the lead.

Source: Netflix.

Comcast is going to lose cable subscribers to cord cutting and many of those people will use Netflix as part of their package to replace traditional pay television. To do that, those customers will need high-quality Internet service and that may keep at least part of their business with Comcast.

You can't always pick your friends
Netflix provides Comcast with revenue from its access agreement and by licensing content from its film and television studios. The streaming leader also drives subscribers to better Internet providers and even tells them each month what the best options are.

Going forward, Netflix should become even more important to its sort-of rival as it moves more into first-run movies and buys original television for markets around the world. Comcast may not want to work with the company that's already siphoning off some if its most lucrative customers, but it has become increasingly clear it's going to have to.

Daniel Kline has no position in any stocks mentioned. He really likes it when two animals who usually don't get along (like a cat and a dog) become friends. The Motley Fool owns shares of and recommends Amazon.com and Netflix. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.