The DFHack functionality was added as being something then missing from Vanilla, and thus implemented as 'a bit of a cheat', as if Revealed, the vein painstakingly designated over[1] then Unrevealed. Given that anything you do in DF is only 'cheaty' if you yourself consider it 'cheaty', that's perfectly legitimate for many who'd use it, and has the 'compensating factor' of perhaps leading you into breaking into a bit of cavern you (still) don't know about, while your back is metaphorically turned.
But it is more useful than micromanaging it (I say this as an obsessive micromanager myself, who rarely uses DFH features), manually going in, following the miner(s) and making a spot-decision as each removed ore reveals any continuations of that ore (same risk of breaking through somewhere you didn't want to, at least you're there to realise it and react, rather than perhaps relyibg on a Notification configuration and its Zoom) but that isn't for everyone and so it became obvious enough to add into the expansion of the Vanilla feature expansion. But as an 'automated micromanager' version, rather than Reveal-powered.
(Though the game knows at least as much about what you'd probably dig through as the utility, it makes less sense to suddenly become a Revealing tool, effectively, than to just have it such that each miner guided to cut down a given base wall-type thinks it part of her task to mentally add any new instances she reveals beyond that tile into the same job-queue she is following. Though it puts you back in 'unmonitored breakthrough' territory, again, without precautions.)
Not that this really adds much to the "how to do it", but as part of the trick to getting on with DF is to get your mindset compatible with what it does with what you tell it to do, I find it's nice to align your mind with the internal design philosophy. Or at least know where your pitfalls are likely to be located.
[1] Though if you were doing this manually, you might make slightly less congruent 'painting' to not (immediately) mine some ore, perhaps shave into non-ore tiles in other places.