How the hell was this unanticipated? You think ramming things into asteroids is not going to create any debris? I thought NASA was full of smart people.
The scientists had known for a long time that this was a possibility. That's part of the reason why the Dimorphos / Didymos asteroids were selected, their current orbit (even if altered a little) and any debris generated will never come close to Earth.
It is an asteroid redirect test. It has not been done before, so it is normal that unexpected consequences happen. It is very difficult to even get high resolution pictures of asteroids.