The central chapters of my dissertation (available at https://drive.google.com/open?id=0B6oYmzobonqobTNBdDNveF9uazg) are about two different ways of understanding the aims of science. quen_tin's answer is fine as far as it goes, but on my analysis there's an even deeper disagreement.
Science produces a variety of different goods. Very generally, these can be grouped into three categories:
- representational knowledge, which might be theories or abstract mathematical models or even physical models (for example, the San Francisco Bay model: https://en.wikipedia.org/wiki/U.S._Army_Corps_of_Engineers_Bay_Model);
- practical knowledge, or knowledge of how to do things; and
- technology, which I define as artifacts (human-made things) that reliably behave in certain ways in a certain range of environments.
(I'm going to circle back to explanation in the second half of this answer.)
quen_tin's answer is about a disagreement over the virtues of representational knowledge: do these representations have to be true, or is empirical adequacy good enough? My dissertation was about a disagreement over the relationship between representational knowledge, on the one hand, and practical knowledge and technology, on the other.
On what I call the narrow view, representation takes precedence over the other two. Science, in the strict sense, is about producing good representations of the world (whether "good" means "true" or "empirically adequate" or something else); practical knowledge and technology are merely "applied science" or "engineering" based on those good representations. The narrow view is closely related to the linear model of innovation (see here), and like the linear model appears to have developed or been widely adopted during the Cold War. Until a couple decades ago, the narrow view dominated academic philosophy of science; however, things are less settled today.
The narrow view contrasts with the broad view. According to the broad view, the three kinds of goods are equally important and interdependent. Practical knowledge and technology don't belong to some subordinate stage of innovation; science, in the strict sense, includes both "pure" and "applied" science, as well as engineering. To illustrate the broad view, think of academic robotics researchers. These researchers generally aren't building whole commercially-useful robots; instead, more often they're working on one small scientific problem — how to get a bipedal robot to navigate rocky terrain, say. This is foundational research; but it's aimed at technology development, not a true or even empirically adequate representation of the world.
How does explanation fit into this picture of the narrow view vs. the broad view? First, note that there are many different philosophical accounts of explanation (see the Stanford Encyclopedia article). Among philosophers of science today, I think there's general agreement that (a) explanations support human understanding of phenomena (somehow), and (b) explanations have some kind of representational adequacy conditions. Maybe explanations don't have to be strictly true or even empirically adequate (see here), but in order to support "genuine understanding" they do have to avoid being "deceptive."
But "understanding" is ambiguous, and I suggest that there are two senses of "understanding," corresponding to the narrow and broad view. On the broad view, understanding why things behave the way they do is useful for predicting that doing X will cause Y to happen (supporting the development of know-how) or diagnosing why technology A isn't behaving as expected in environment B. Explanations support a kind of practical understanding, and thereby connect representational knowledge with practical knowledge and technology. This means that explanation is quite valuable on the broad view. Indeed, insofar as it can be nearly impossible to develop sophisticated know-how or technology without some degree of understanding, explanations are necessary for science to achieve its goals. (For a very readable example of the broad view, and specifically the importance of understanding, I recommend Cartwright and Hardie's Evidence-Based Policy.)
But the narrow view either (a) can't accept this account of understanding and explanation, or (b) concludes that it's less valuable than representation by itself. Understanding and explanation are useful for producing practical knowledge and technology. But, on the narrow view, those are the goods of applied science and engineering, not science in the pure or strict sense. So either (a) the narrow view needs a different account of explanation, that connects it to representation; or (b) it concludes that explanation isn't that valuable.
To go back to quen_tin's answer, the realist who defends inference to the best explanation takes option (a): explanations are valuable because they help us reach the goal of true representations. Van Fraassen explicitly chooses option (b). His book The Scientific Image has a whole chapter on "The Pragmatics of Explanation," which is a beautiful discussion of the relationship between explanation and understanding. But, based on this connection to understanding, van Fraassen concludes that explanation is basically irrelevant to science, because the primary aim of science is empirically adequate representation. As quen_tin puts it, "But in any case [explanations] do not constitute the aim of science, rather, for empiricists, a byproduct, or, for realists, an heuristic to achieve its true aim, which is to produce true or approximately true theories."
This is why I think quen_tin's answer — again, which was good as far as it went — missed the deeper disagreement. Realists and empiricists share the assumptions of the narrow view, which has trouble accounting for the value of explanation and understanding. But philosophers taking the broad view see explanation and understanding as extremely important.