As I had mentioned, the term is not "hard code", but "hard-coding
", and it just means that the behavior is determined at compile-time and cannot be changed based on input from the user. In older versions of Dwarf Fortress, far more of the game's behavior was hardcoded - it wasn't until version 0.27 that custom reactions were added, and it wasn't until 0.31 that it became possible to add custom reactions to buildings other than Smelters.
There are actually a lot of hardcoded things in Dwarf Fortress that can
be modified using DFHack, but some are more difficult than others - for example, DFHack can easily change the number of dwarves you get during embark (by modifying the relevant machine code that normally loads a value of 7), but it cannot easily add new item types (because there are dozens, if not hundreds, of places that would need to be patched in order to handle it).