As other commenters here have mentioned, The Producers wasn't an automatically successful movie when it came out. It was, to quote Brooks, "crucified" in the New York Times (which called aspects of it "shoddy and gross and cruel"), and received a lot of bad press for being tasteless, in addition to doing relatively poorly at the box office. It had nearly been pulled from theaters after a terrible opening night in Pittsburgh and was only saved by Peter Sellers taking out a laudatory ad in Variety. The movie basically created Brooks's image as a "controversial" comedian and filmmaker. It was also made on the cheap, and got panned for not having a lot of the production values which were often expected of movies in that era. It's really only after the passing of time that it acquired a reputation as a "cult hit" and therefore, in a sense, got normalized- besides for the fact that Brooks had already solidified his reputation for "controversial" comedy in movies like Blazing Saddles and History of the World, Part One. It was criticized at the time for a number of reasons, including that the Nazis as comedy fodder at all (similar criticism was made about the TV show Hogan's Heroes) and the fact that he seemed to equate American theatrical showmanship with Nazi propaganda (which in turn made it seem as though the American public might accept a Hitler if he were amusingly packaged, and which was seen as part of a broader trend of liberal criticism of American culture as Weimar-esque).
In a sense, the real question is the opposite of what you asked- how has a movie which was seen as so utterly tasteless (if still very funny) when it came out now come to enjoy reverence as a great skewering of the Nazis? I'm not sure how to answer that without breaking the 20 year rule on this sub. American Jewish historian Kristen Fermaglich's theory is that there is an inherent difference between the original film and the Broadway adaptation/remake, which is that the first film was much wilder and at a more pivotal turning point in the American Jewish experience in which American Jews were trying more self-consciously to be "white" and on both sides of the fence about the counterculture), both factors which led to a great outcry and disgust about it. She sees the movie as, while not being explicitly Jewish, hinting to the Holocaust, making people sympathetic to the Jewish caricatures Bialystok and Bloom, and expressing Brooks's rage at the way that the Jewish experience in the Holocaust was at that time being, not so much suppressed, as underexamined. In contrast, the musical came at a time when the American Jewish experience was tamer and these crises had by and large passed, and the musical and remake are in kind a lot less crazy and provocative than the original. The Holocaust was more emphasized, Jews faced less and less an insider/outsider crisis, and a lot of the rage and wildness of the original film was no longer used. Certainly, as well, there is an element of Mel Brooks becoming an icon of controversial comedy- while The Producers was his first film and was judged on its own, later on it began to be judged as part of his oeuvre (as mentioned above) and as a film produced by a "comedy legend."
(I personally still think The Producers is tasteless and hate it as "skewering of Nazis," but while people would have agreed with me in 1967 they would be far less likely to agree with me now.)
Sources:
Fermaglich, "Mel Brooks' The Producers: Tracing American Jewish Culture Through Comedy, 1967-2007"
Symons, "An audience for Mel Brooks's The Producers: the avant-garde of the masses"
Adler, "Screen: 'The Producers' at Fine Arts" (NYT review)
Symons, Mel Brooks in the Cultural Industries : Survival and Prolonged Adaptation
When The Producers came out initially it was a limited release in a couple theaters and ran. Mel Brooks remarked at one premiere “7 people in a few thousand seat theater? This movie is not doing well.” And it seemed like the studio and the executives just wanted this to die out.
However a couple events happened that would change the movie’s image and give it more exposure. The big one was Peter Stellaris praise of the movie. Now Peter Sellers has no stake in the movie or knew really anyone from the movie. Peter Sellers was well known for his role Dr. Strangelove and the Pink Panther series. He was also known to be quite eccentric and a bit of a character. Apparently he would gather friends to watch movies at a movie studio where he was shooting a film. And then they would eat certain cuisine based around that movie background, also they would have pot brownies as well. During one movie night they were going to have Italian cuisine while watching I Vitelloni an Italian comedy. But apparently they didn’t have the film and Sellers was outraged and started get really angry. But the guy in charge of the projector said while they didn’t have Vitelloni, he had some movie by Mel Brooks called the Producers. Sellers still mad about this just said to put it on, then after watching the entire film and laughing the entire way he went to a phone to contact a couple nationwide newspapers. He told them to take a full page ad about how great this film was and here is the headline:
“Last night I saw the ultimate film... The Producers or as it was originally known Springtime for Hitler. Brilliantly written and directed by Mel Brooks, it is the essence of all great comedy combined in a single motion picture. Without any doubt, Mel Brooks displays true genius in weaving together tragedy-comedy, comedy-tragedy, pity, fear, hysteria, schizophrenia, inspired madness and a largess of lunacy with sheer magic. The casting was perfect. Those who have seen this film and understand it have experienced a phenomenon which only occurs only once in a life span.”
This really helped The Producers get some exposure and praise as it was really unknown at the time. Combine this with Sidney Glazer the producer for The Producers who demanded that the movie get a large release that was spelled out in the contract. After these events and the larger release across the country, it became a huge hit. The rest is history as it has now became a great movie that started Mel Brooks’ directing debut.
I can't believe I missed this. In addition to the wonderful answers by u/TheNorthie and u/Hannahstohelit, you might be interested in the answer I gave to the question "Was there controversy around Monty Python's Flying Circus' use of Nazi Germany for comedy less than three decades after WWII?"
Edit: Note that the film doesn't overtly mock the Holocaust. It approaches it, but doesn't mock it. In *The Last Laugh*, Brooks noted that he would not make light of the Holocaust, but only Nazis. That we automatically read a movie with references to the Nazis as a movie with references to the Holocaust actually tells us something about the way that the Holocaust has grown in American consciousness since the airing of *The Producers*.