It's a cliche of Westerns, maybe most famously used in the John Ford/John Wayne classic Stagecoach: The protagonists are in mortal danger, they can't save themselves, and... here comes the Calvary to bail them out!
Or in Greek drama the protagonists wrestle with a moral dilemma, only to be saved at the end by a deity, the Deus Ex Machina, flying down and supplying a solution.
It's fashionable to disdain this kind of resolution. Shouldn't the characters earn their own redemption? Isn't it a cheat to bail them out with the narrative equivalent of a Get Out Of Jail Free card?
Maybe. But I find I'm more receptive to this kind of thing lately. It reiterates our dependence on forces outside ourselves, whether that something is as cosmic as God or something as mortal as law enforcement. Even John Wayne can't overcome every challenge... sometimes his grizzled individualism needs social structure and collectivism like the Calvary to keep him going.