 According to both John Ford (I) (qv) and James Stewart (I) (qv),  Ford added the segment with Stewart in place of an intermission.  Ford didnt want people leaving the auditorium to go the bathroom or  concessions counter, even though the film was long, and so he came  up with the Wyatt Earp segment. He later quipped to Stewart that the  actor was the "best intermission" in the movies.