The other part is the limited production runs. Until last month, the DoD was generally purchasing ~100 of these annually. There's no scale economy in making these, so those 100 missiles need to support the entire production & R&D of the product.
Also if you want to harden the rocket against EMP attacks you need an inertial guidance system, and those things also demand extreme precision.
Once you add in modern electronics and guidance and reliability that cost quickly skyrockets, going up an order of magnitude at each step of complexity (advanced guided like the Javelin, cruise, ballistic, etc).
This is a rather basic (passive) seeker head by modern standards.
https://en.wikipedia.org/wiki/File:R-27_missile_homing_head,...