In the US, Europe, Canada and other countries with nearly 100% literacy rates, dubbing vs subtitling is certainly a matter of preference.
Subtitling allows the viewer to get a more exact translation of the dialogue but requires that the viewer read the text, potentially missing visual elements of the film.
From TV Tropes:
Subtitling has many advantages: It allows for an extremely accurate translation, including quirks of the original language that play a role in the plot, while allowing you to hear the original actors' performances. It renders the show accessible to the deaf or hard of hearing. People bilingual in or learning the original language will be able to benefit as well, since they can enjoy at least parts of the film/TV show in the original while their friends can still know what's going on.
Dubbing allows the viewer to fully immerse themselves in the film but the translation (because the attempt is often made to match the foreign dialogue to mouth movements, at least in duration - called "Lip lock") can greatly suffer.
Viewers whose thought processes are more speech-oriented than word-oriented also may simply find dubs easier to comprehend and process, especially in works that are heavy on meaningful dialogue or exposition. The opposite, of course, can be true for viewers who process information more easily through the written word than through speech. For many viewers, hearing the dialogue in their native language makes it easier to immerse themselves in the media and feel a sense of familiarity with the story and characters that is much harder to obtain while trying to hear dialogue in a foreign language and simultaneously read subtitles. Hayao Miyazaki has said several times that he always intended his films to be watched, not read, which is why he supports them being dubbed into other languages.
Hearing actors speaking one's native language also allows the audience to catch subtle non-verbal parts of a performance, which many times is part of the "authentic" viewing experience the original was shooting for. Subtitles can cover up important parts of the image or switch too quickly to be read by everyone, especially if the show is extremely fast-paced, dialogue and/or text-heavy, or aimed at younger audiences – for example, go look up the subtitled Tatami Galaxy; many a YouTube commenter have complained that the subs are simply too fast to read... for the entire series. In addition, subtitles – particularly for unofficial fansubs – are sometimes criticized for being too literal; a well-made dub can preserve the spirit of a joke or reference, even while replacing the actual line. Not to mention all the cultural references that are not understood outside the native country (phrases, puns, etc.) may wind up Lost in Translation if there's no explanation. This is much much easier to work around in a print work, because one can read at their own pace.
To see this specifically, I encourage you to find a film that's been both subtitled and dubbed and watch the film dubbed with the subtitles on and you'll really see a major difference (provided the subs are true subs and not captioning). I first became painfully aware of this when watching Steven Chow's Shaolin Soccer a decade ago. There's so much more color and comedy in the dialogue if subtitled rather than the dubbed version.
The article from TV Tropes further points out an interesting point that the English-speaking native may not think of... because so much of film is produced in English, the argument of which is better doesn't really exist in many non-English communities:
Funnily enough, this debate doesn't really arise in non-English speaking countries when it comes to English language films. Mostly because of the omnipresence of Hollywood, one can easily assume that at least half the movies someone from Germany, Russia, France, Italy, or Brazil will see in a year are English-language movies. Thus, many countries have a well-entrenched, very active dubbing industry with recognizable voice actors. In most cases, one dubber is paired with one actor for the duration of the actor's career. In these countries, due to enormous exposure to it, dubbing is seen much more positively than in the anime community.
But, on the other hand:
The opposite can happen too. In some countries (such as The Netherlands, Denmark, Norway, Sweden, or Finland), dubbing is only done for works that are intended for children that are too young to read the subtitles fluently. Everything else is available with subtitles only. In these countries, people would get much more distracted by the dubbing because they are not used to it. This pattern is particularly common where a substantial chunk of the population in the country is fluent or at least proficient in English – which is incidentally true in the Netherlands as well as the Nordic countries. A major problem are works that appeal to both the children and the parents, the parents would prefer to hear the original actors' performances, but can't get their hands on it because the only version in theaters is aimed for kids.note Sometimes they can get lucky and the original audio track is included in the DVD release once (if ever) it happens.
Now, in other countries where the literacy is lower, dubbing becomes more necessary. Here's a chart of literacy in the world as of 2013:
"Analfabetismo2013unesco" by Alex12345yuri - Own work. Licensed under CC BY-SA 3.0 via Commons - https://commons.wikimedia.org/wiki/File:Analfabetismo2013unesco.png#/media/File:Analfabetismo2013unesco.png
Granted, a lot of people who are illiterate may not be going to see a film as illiteracy is more common amongst the very poor, who may not be able to afford to see a film, but it's worth noting.
Now, I know you asked why it would matter to the viewer, but I do want to mention the production side of things.
Dubbing is much more expensive than subtitling. Writers have to spend time creating dialogue that will fit, then actors have to be paid to do a studio recording (and the studio has to be paid for), it can take hours of work for each character and the audio tracks have to be edited to match up perfectly.
That's why, particularly in the case of small-budget projects or projects with a niche audience, it's rare to find dubbed versions. It makes more financial sense to subtitle.