We're all sorry to hear of the death of the great Andy Griffith. Turner Classic Movies had already been planning to air one of my favorite movies, "A Face In The Crowd," in late night later in the week.
I was looking for the story, and couldn't find a link to it just now, but I'm pretty sure I remember it correctly: "A Face in the Crowd" was directed by the great Elia Kazan, a devotee of method acting, and Andy was encouraged to throw himself completely into the role of Larry "Lonesome" Rhodes. But Rhodes is a long way from Sheriff Andy Taylor: he's selfish and abusive. Griffith was so good at method acting that he found himself inhabiting Rhodes a little too well; even when not on screen, he was behaving like Lonesome Rhodes to his friends and family. He didn't like that, and resolved to play more pleasant characters from that point on. He eventually played some villains again later in his career, but I suspect he didn't use the intensity of method acting to do so.
(Even though it's not Andy Taylor, you really need to see "A Face in the Crowd" if you haven't done so already. It's a powerful movie about celebrity, politics and manipulation that in some ways is even more relevant now than it was in the 1950s.)
Anyway, a year or two later Danny Thomas, who had his own sitcom, "The Danny Thomas Show" (also known as "Make Room For Daddy"), and his business partner at the time, Sheldon Leonard (Nick the bartender from "It's A Wonderful Life"), had the idea to create a sitcom starring Griffith as an amiable small-town sheriff. They pitched the idea to CBS, but CBS wasn't interested enough to pay for a sample episode, which in TV jargon is called a "pilot."
But Thomas and Leonard were sure that if they could get the network to see Griffith in the part, they'd change their minds. The partners decided to do something which had never been done before in TV's brief history. If the network wouldn't pay for them to shoot a pilot as a separate, stand-alone project, they would shoot one anyway -- as an episode of "The Danny Thomas Show." They contrived a story in which Danny Thomas' character had to make a trip to North Carolina and had car trouble while driving through a little town called Mayberry.
Sure enough, CBS changed its mind once it saw Andy Taylor, and Mayberry, on screen. Today, using an episode of an existing show as a pilot episode for a new show is called a "backdoor pilot." "The Andy Griffith Show" was the first program to be sold to a network that way.