So what was the purpose? Was there a chance they'd hit the moon, they'd make measurements, and then say, "Well dang, I did NOT expect that to happen?"
As others have noted, yes, there was, and is, a very good chance of that happening. As I recall, the two relatively recent sample return missions, which most closely approximate what NASA was doing with DART (but not crashing), both (actually three) had exactly that happen. The first Hayabusa mission failed and had to try again, and both Hayabusa2 and OSIRIS-REx had unexpected things happen because of the makeup of the regolith, gravity variations, and other things. So yes, while we understand the math, there are still a great many things that we do not understand well and, more frighteningly, our limited experience tells us that there are still more things that we don't even know that we don't know. Yes, we understand the math that we know, but there remain unknowns in the mathematics that we still don't know, which implies that we really don't know the math as well as we *think* we know the math.
And, when the day comes that we need to do this to save the planet (or half of it), we had better understand it VERY well and get it right the first time.