I usually dig down around a raised bed, to add drainage and aeration. (My base "soil" is near-pure clay, and my amended soil is something like "clayey clay clay soil".)
This also makes weeding easier, since I can stand down in the ditch and bend over less to reach the raised bed surface. In the deepest walkway, from certain angles, with a few plants growing, my neighbors only see me from the chest up!
The soil I dig out of the walkways/trenches eventually winds up back in a raised bed, after screening and amending and incubating with compost. In fact, usually the raised bed got "total soil replacement" since I removed all of it for screening and extensive amendment, then wheelbarrow-ed it back.
I just wish I had 5 times as much compost!