In undergrad I was fairly successful in avoiding having to study the history of philosophy. Unfortunately this could not last; as part of my MA I'm having to take no fewer than three courses on it - Ancient Philosophy, Rationalism and Empiricism (i.e. early modern philsophy - Descartes et al) and Continental Philosophy. This is a fairly fixed part of the curricula for degrees in philosophy, and for a long time I have wondered why. In this post I shall attempt to make a positive case for studying history of philosophy; I currently have no concrete plans to make the opposite case, but one might just happen to appear.
(1) The value of past philosophers
The fact that something is old does not mean its ideas are irrelevant. Indeed they may be stronger, for having stood the test of time. And perhaps there are some ideas which are just flat-out wrong (the world is not, for example, made entirely of water) but studying these ideas is useful for understanding the climate in which other, more valuable ideas, emerged. Perhaps much pre-Socratic philosophy reads like mysticism, but given that Socrates - at least in the earlier dialogues - is concerned not so much with making positive arguments so much as tearing down the ideas of others, it is important to know what he was responding to.
Kantian arguments still command respect in ethics; Jeremy Bentham, if he were alive today, would be accepted but broadly within the mainstream. The case is easier to make for ethics than for "natural philosophy", it is true, but this shows that there is still value to be had by learning historical ideas.
(2) Unlearning assumptions
Nowadays we take a great many ideas for granted. But these are not ideas you can genuinely project from a blank canvas: we believe them because we were brought up to believe them. If we are to hold (for example) advocacy of democracy as a substantive belief rather than as a tenet of unreasoning faith, we need to look at the thoughts of people for whom democracy was a strange and frightening idea. (And who knows, they might be right! The historical progression of ideas is not guaranteed to be in a positive direction!)
(3) Practice at interpretation
One of the key tasks of any philosopher is to respond to other philosophers and their arguments. Studying the history of philosophy helps to develop a number of skills useful for this. Upon first reading, many historical philosophers appear to be obscure and/or blatantly wrong. To properly apprehend what they have to say, we have to apply hermeneutics and the principle of charity - both of which will be useful when engaged in discussions with fellow contemporary philosophers.
NB. Even if the case I am making here is correct, I doubt it is really why we have to study history of philosophy. (1) provides little justification for reading anyone in the original, rather than merely in summary; (2) provides little justification for teaching history of philosophy as independent courses, when we could teach history of metaphysics as part of a metaphysics class*; (3) suggests that the choice of texts is in fact fairly arbitrary.
* Imagine that! A class mixing metaphysics with history of philosophy! The ultimate feast of utterly worthless mental masturbation!