The Old West town of Calendar, Colorado, springs up almost overnight when clumsy, hotheaded Prudy Perkins (Joan Hackett) discovers gold in a freshly dug grave during a funeral. Her father Olly (Harry Morgan) becomes mayor of the new settlement. He and the other members of the town council bemoan the facts that the place has become a drunken round-the-clock free-for-all, and that to ship out all the gold they are mining, they must pay a hefty fee to the Danbys, a family of bandits who control the only shipping route out of town. Most people are too busy digging to take time out to be sheriff, and those who are willing to put down their shovels quickly die.This changes with the arrival of Jason McCullough (James Garner), a calm and exceptionally competent man from "back east" who says he is only passing through town on his way to Australia. While in the town saloon, he sees young Joe Danby (Bruce Dern) gun down a man. Needing money after discovering the town's ruinous rate of inflation, McCullough demonstrates his uncanny firearms ability to the mayor and town council, and becomes the new sheriff. He breaks up a street brawl and while at the Perkins house meets Prudy under circumstances that are mortifying for her. McCullough arrests Joe and tosses him in the town's unfinished jail, which lacks bars for the cell doors and windows. McCullough keeps the dimwitted Joe imprisoned through the use of a chalk line, some dribbles of red paint, and applied psychology.McCullough acquires a reluctant deputy in scruffy Jake (Jack Elam), previously known as the "town character". The arrest of Joe Danby ignites the wrath of the patriarch of the Danby family. While the rest of the town quiets down under McCullough's reign, Pa Danby (Walter Brennan) mounts various efforts to get Joe out of jail. None of them work, so he brings in a string of hired guns, who are equally unsuccessful. Meanwhile, Prudy spars romantically with McCullough, McCullough and Jake go on an unsuccessful search for gold. Bars are finally installed in the jail.Pa Danby summons a host of his relatives to launch an all-out assault. The sheriff's first impulse is simply to leave town and resume his trip to Australia, but when Prudy expresses her sincere approval of this sensible idea, he announces that it sounds cowardly and decides to stay. The rest of the townsfolk announce their disapproval of his new plan, and officially vote not to help in any way. Thus, the Danby clan rides in faced only by McCullough, Jake, and Prudy. After a lengthy gunfight, McCullough bluffs his way to victory using Joe as a hostage and the old cannon mounted in the center of town. As all the Danbys are marched off to jail, the supposedly unloaded cannon fires, smashing the town brothel and scattering the resident prostitutes and visiting civic leaders.Sheriff McCullough and Prudy get engaged. In a closing monologue, Jake breaks the film's fourth wall and directly informs the audience that they get married and McCullough goes on to become governor of the state of Colorado, never making it to Australia (although he reads about it a lot), while Jake becomes sheriff and "one of the most beloved characters in western folklore".
Output: Question: Why does McCullough take on the position of sheriff?, Answer: He needs the money.