The Wikipedia entry for “Monkey’s Uncle,” before I edited it, stated that “The phrase has been said to date from 1925, the year of the widely publicized Scopes Trial in the United States, where the term first appeared.” That seemed to imply that the publicity around the Scopes Trial played a part in the emergence of the expression.
On the other hand, the Wikipedia entry also noted that OED cites the first use as occurring in an Ohio newspaper in February 1925. That was five months before the start of the Scopes Trial.
In fact, use of the term predates 1925 by several years. In addition to the 1917 ad, there were other uses of the term in print in the early 1920s, including several in advertisements. That’s a good indication that it was in fairly common use in vernacular speech before showing up in print.
It does seem likely that, as the Wikipedia article states, the expression arose as an expression of disbelief in response to the theory of evolution and the notion that humans and apes had a common ancestor.