That is one of the reasons. Yes, authors intentionally do that people sometimes the audience loves the dumb girl (they see it as cute) to ship her with the MC (which is dumb) but that's fanservice for you. Another reason is for the dumb girl to ask questions so that the MC can answer or solve them, thus elevating the MC's competence. That's why there are barely any good mystery mangas that doesn't involve such idiotic characters. -sighs-
The reason why there's idiotic character is to explain the logic to the viewers. If everyone's is smart, they won't need to explain things a lot isn't it? If they just talk out his/her thought process, it will become bland and sometimes clash with people's common sense. Just think the idiotic girl as a commoner that represent general viewer. The reason why they have opposite gender is to spice up their relationship later on.
the author's afraid that you're too dumb hehe

In every great manga there's an idiot, why? I've read so many mangas with smart main characters but in every single one there is a dumb, idiotic girl. WHY? I hate that. Does the author do it intentionally to make the mc stand out even more?