You still get video and sensor readings from the flight, you get a dust plume to analyze from a distance (especially with bigger impactors also giving you data about what's below the surface).
Even making it that far is a testament to the prowess of your space organization. It's a cheaper first step which probably directly and indirectly tests some 75% of the components needed for an actual landing.