I'm a PhD student in history of science, so I'll try to give some perspective from that end.
History of science really arose as a field in which scientists would try to understand history. George Sarton, the founder of the field, was a mathematician who then took up the history of mathematics. Edward Kremers was a pharmacist who became interested in the history of pharmacy's professional development. There are a lot of good works on the origins of the field; I'd recommend Peter Dear's "The History of Science and the History of the George Sarton, Isis, and the Two Cultures" ISIS 100, no. 1, 89-93. Alternatively, you can look at Victor Hilts' article about history of science at the University of Wisconsin, “History of Science at the University of Wisconsin,” Isis 75 (1984), 63-94.
Now, to answer your question, it depends. I know two historians of chemistry who first obtained PhDs in organic chemistry, then went on to PhDs in the history of science. However, I know another historian of chemistry who trained only as a historian of science. It's tough to generalize, but as the field stands as of 2017, a historian of chemistry is often trained as a PhD solely in the history of science. One of my program's best known scholars is a historian of medicine. Her PhD is in the history of science.
History of music is different and something I can't really address.