Intentionally crashing spacecraft not only removes the possibility of orbital space debris and planetary contamination, but also provides the opportunity (in some cases) for terminal science given that the transient light released by the kinetic energy may be available for spectroscopy; the physical ejecta can be used for further study.
Even after soft landings had been mastered, NASA used crash landings to test whether Moon craters contained ice by crashing space probes into craters and testing the debris that got thrown out.
[1] Several rocket stages utilized during the Apollo space program were intentionally crashed on the Moon to aid seismic research, and four of the ascent stages of Apollo Lunar Modules were intentionally crashed onto the Moon after they had fulfilled their primary mission.
A recent impactor, the unusual double-crater of which was photographed on March 4, 2022 by the Lunar Reconnaissance Orbiter, is of unknown provenance; no space program has taken credit for it,[2] although a later study attributed it to a spent upper stage from the Chang'e 5-T1 mission.
Terminal approaches to gas giants which resulted in the destruction of the space probe count as crash landings for the purposes of this article.