The Other Guys is a surprise because a good comedy is always a surprise. I generally assume a comedy, and this goes double for big budget studio made comedies, will suck for the simple reason that so many of them do. Even if you manage to start with a funny script, it will generally get torn apart by the studio system that relies on marketing research and the judgment of executives who possess the sense of humor of an artichoke instead of the judgment of funny writers who write the funny scripts to determine what eventually makes it onto the screen. In the case of The Other Guys, I'm assuming the latter were in control as opposed to the people with MBAs.
The Other Guys is not a great comedy but it is a pretty damn good one. It's not good because of its starkly realistic plot mainly because The Wizard of Oz is more realistic than this. In fact, the plot is pretty damn stupid but, in this case, that didn't detract from the laughs. The Other Guys is a funny movie because the filmmakers found a way to take distinct and well drawn characters and keep them funny for the entirety of the movie. Movies like this usually run out of steam in about 30 minutes. If you're lucky, it stays funny until the final act when special effects and car chases take over. There were car chases at the end but even those were funny.
The movie opens with Samuel L. Jackson and Dwayne Johnson playing Highsmith and Danson, two typical action movie cops. They jump on the hoods of moving vehicles, drive through buses, fire about 10,000 rounds of ammo in civilian populated areas and blow up buildings in pursuit of the bad guys. It's even acknowledged that they causes over $12 million in damages while chasing drug dealers who only had a pound of marijuana on them but no one cares. In the movies most realistic moment, they become so convinced of their invincibility that they jump off a 12 story building while chasing some bank robbers, an act that leads to their deaths. This leaves an opening in the New York City's hero department and Detective Terry Hoitz (Mark Wahlberg) thinks that he and his partner Allen Gamble (Will Ferrell) can be the ones who fill that opening. This plan has a few drawbacks. One is that Terry was a rising star in the police department until the day he shot Derek Jeter. This was why he was partnered with Allen, a former member of the Forensic Accounting Unit who became an investing detective because...well, I honestly don't have a clue how he ever became a detective.
Allen is the Will Ferrell character, that being a guy who is generally a dimwit but also possesses extraordinary abilities that make him larger than life. Allen's super-Ferrell powers in this case are his ability to gleefully immerse himself in the bureaucratic minutiae of his job while maintaining a sunny attitude and the fact that beautiful, sexy women, for some reason, find him irresistible. Allen doesn't notice this. In fact, he routinely refers to his wife as plain even though she's played by Eva Mendes.
Allen and Terry start investigating some sort of illegal investment plot that's basically a child's introduction to economic malfeasance headed up by a crooked broker played by Steve Coogan but it really doesn't matter. As I said, the main plot has nothing to do with why The Other Guys is worth seeing. It's worth seeing because it's funny. The writers wrote funny things for funny actors to do and say. In the end, that's all you really need.