To give another perspective, when teaching an intro to web development course it's very useful to teach things in a way similar to how they were discovered and contextualize the different concepts in history. It's easy to understand why HTML is a markup language rather than a full fledged language when you consider the time: The Web was used for serving plain text pages, and they wanted a little markup to make it nicer. HTML was born. When styling become larger than HTML could encompass, CSS was born. When interactions wanted to be built in, JS was born, etc. Otherwise you can get into extended discussions about why the front-end environment is the way it is.
In cryptography it's the same way. By following the history you can see the mistakes of those before you, and thus avoid those mistakes. Crypto is all about the cycle of making a new algorithm then having it broken, and the arms race that it causes. History illustrates common pieces of advise, like to avoid security by obscurity, and history also shows why perfect forward secrecy is needed. It shows the need for key exchange, and shows the relationship between unsolved math problems and crypto. All of these are great reasons to teach crypto in chronological order, from the oldest discoveries to the newest.
I would guess that this sense of parallels between the order in which things are invented and the order in which things are taught exists in other fields as well, and so teaching history along with the normal coursework could be very useful.