Economic history is valuable for two reasons. The short-term reason is the purpose of the work: to illuminate some piece of history from an economic perspective. This is the value for people who want to understand how that bit of the world worked.
The long-term reason that economic history is valuable is that it makes economic ideas more accessible to historians (and others) who wouldn’t necessarily be reading primary economics texts. Through them, non-specialists who read history can absorb ideas they might not otherwise get. I focus on history here because it is an area where an educated non-specialist can a good deal out of an academic-quality work. This is hardly possible in, say, chemistry.
This cuts both ways though. If the economic theories employed are bunk, the work has no net effect or sets us back. I think specifically of Marxist economic histories here, which at best illuminate interesting phenomena but misdiagnose their causes and resolutions. This is one reason why methodological individualists should invest at least some of their time in analyzing history.