The story
Originally said in early movie theatres, when the custom was not to come in at a set showtime, but rather at any point during a repeating bill of short features, staying until one had viewed the whole bill up to the point that had been playing when one came in.
Etymology from Wiktionary, CC BY-SA 4.0.