The concept and implementation is simple. When the mod is initialized (note, in singleplayer this requires a world to be loaded!) the vanilla loot-tables are scanned, and then cached. Files are then loaded and parsed from the config directory, and their contents are applied to the loot-table.
What this means is one has complete control over what spawns in chests, how much of it, and how rare it is. The control ranges from simply adding/removing items, to replacing the entire loot table with your own items.