I think there is definitely something to two ideas that were expressed.
1) Comedy works best with one goofball and one straight-man (in this case a woman). No different than Abbot & Costello or Laurel & Hardy….one fat buffoonish character, one put together straight man. Even the Odd Couple…Oscar may not have been “fat”, but he was the comic foil to Felix’ straight man. This formula is just applied to the husband/wife combo in a sitcom.
2) Men in general do have a double standard…they would be more likely to watch a show with an unattractive male and an attractive female than the other way around, because men are visual. Women by and large don’t care if there’s eye candy on the screen, they are less visual, some might say less shallow. So, yes, men can more easily relate to the buffoonish male and desire the put together female.
But I think there’s a third factor that explains shows like Raymond, King of Queens, et. al. These shows were vehicles for the stars and were based on the male’s stand up act. The entire show is based on the comedy act of the star, which is an act in which the star makes fun of his own buffoonishness. When the rest of the show is cast, well it’s just a simple fact that people in general (men AND women) would rather see attractive people on the screen than ugly people, which is why the vast majority of stars are more attractive than most people we encounter in every day life. So, we end up with the unattractive, buffoonish male by default, and the glamorous stars for the rest of the cast as that’s how casting works.