The foregoing answers are correct. The distributor (movie studio) takes 70-80% of the box office on opening weekend, sliding downward to around 20-25% after a period of some weeks, with the exhibitor (theater) taking the remainder plus certain exceptions for infrastructure and overhead. These figures will vary from movie to movie.
Thus it behooves nobody to leave a stinker on the screen. The distributor has already made most of what it’s going to make after seven or ten days, even if the movie doesn’t fall off by 50% in the second weekend like most big studio movies do these days. And as far as the distributor is concerned, 20% of an opening-weekend take of (say) $10M is bigger than 75% of a four-weeks-later take of $1M, especially when you consider that their primary source of revenue, concession income, has (using those numbers) dropped to 10% of opening weekend.
In addition, it costs money to keep physical prints in circulation. The quality of these prints degrade over time, and eventually become unplayable. A successful movie is something of a mixed blessing, because the prints may or may not be usable when the movie opens overseas, and making additional copies gets expensive. But if the movie is a stinker, the prints are withdrawn quickly so they can be recycled into those other markets, and new ones don’t have to be struck.
The other observations are also correct. A movie that acquires a stink in the cinema will be harder to move on video. A movie that has staying power, called “legs” in industry parlance, will play forever because it is in the exhibitors’ favor to do so (examples: Titanic, Sixth Sense, There’s Something About Mary, Big Fat Greek Wedding).
The discount houses mentioned by Wheel usually get their prints on a flat fee, rather than on a percentage basis, because the “prime period” for the movie has already passed, and the title may well be available on home video. That’s why the ticket price is so low; it’s almost all profit for the exhibitor (albeit a slim one).
As far as why the sliding scale exists at all, it’s because the studios have a virtual monopoly on film product, and get to set the terms; the exhibitors don’t make their own movies and must rely on the distributors for product. The studios have found that taking 80% of 80% over the first two weekends is far more reliable in terms of revenue forecasting, not to mention the short-term profit model that dominates American business these days, than hoping for 50% over eight or more weekends. It’s also a control issue; studio executives are notorious for “bigger dick” mentality, and just want to be in charge. And further, Hollywood lives and dies by precedent: If one person does something, everybody else feels entitled to it. So when one massively anticipated movie permits its distributor to dictate newly draconian terms, the bar is set for future movies. Over time, we wind up with the weirdly skewed system we see today.