The whodunit murder mystery trope that the butler is the culprit goes back to one book, The Door.
The first known instance of the butler being guilty of a whodunit crime is the 1893 Sherlock Holmes story The Adventure of the Musgrave Ritual, where Brunton the butler tries to locate & steal a hidden treasure (spoiler). The next known instance was 1921’s The Strange Case of Mr Challoner by Herbert Jenkins, but being published at the dawn of the Golden Age of Mysteries the work got lost in the shuffle and nobody really took notice (of the butler or the story). It wasn’t until 1930’s The Door by Mary Roberts Rinehart that the trope really took off.
Mary Roberts Rinehart was the “American Agatha Christie”. She was a best selling author in the Golden Age of Mysteries who was enormously popular. When her sons launched a new publishing company she wanted to give them a successful novel to produce so she quickly wrote The Door and had the butler be the murderer. Also, as an example of a false memory / Mandela Effect, while the butler did it nobody every says “the butler did it” in the book.
It was around this time however that critic and writer S. S. Van Dine wrote the article Twenty Rules for Writing Detective Stories where one of his rules was that “A servant must not be chosen by the author as the culprit.” The success of The Door, combined with the turning literary tide against making a servant the villain, quickly made “the butler did it” both a popular plot device and a cliche joke. It began to pop up in other detective stories, it was satirized, and today it lives on as a trope of early 20th century whodunit stories.
Added info: Mary Rinehart was the victim of a real-life murder attempt. Her chef, Blas Reyes, was angered over not being promoted to the position of butler, which Rinehart filled with an external hire. On June 21, 1947 Reyes couldn’t take his frustration anymore, he walked into the library where Rinehart was, pulled out a gun, and from five feet away he fired … or tried to fire. The bullets were so old they didn’t fire. Rinehart ran for the kitchen door and what followed was a chase through the house with Reyes picking up kitchen knives on his way through the house following Rinehart. Eventually he was subdued by other staff members of the house and turned over to the police.
Also (far less dramatic), in regards to the duties of a butler, they vary greatly by household but a butler is typically the head of the dining room, wine cellar, and pantry. They are not usually an all-around assistant, but they can be depending on the employer.