The Hayabusa 2 probe is firing tantalum bullets at the asteroid Ryugu to knock off material that can be sampled. Why tantalum? That’s a pretty obscure element and I would assume rather rare. What properties made it the best?
The main reason for using tantalum is the fact that it is a rare element. When they capture the debris thrown up by the bullet, the fact that the bullet itself is tantalum makes it easy to distinguish it from the asteroid's material. If they used a more common element like iron, scientists could not be sure that any iron was from the asteroid, instead of from the bullet.
The second sample attempt will use a heavy (2.5 kg) copper slug, again because copper is expected to be relatively rare on the asteroid.
Why tantalum for the bullet? Because it’s so rare that if a piece of it gets into the sample scientists will know right away it was from the bullet and not the rock. If they used something common, like iron, there wouldn’t be a way to distinguish it from the native materials.
And Hayabusa2 is not done yet. There’s another surface sample event planned, as well as an ambitious subsurface sample mission: It’ll deploy what is essentially a floating cannon that will fire a much more energetic 2.5 kilogram copper projectile into Ryugu, overturning the material sitting on top and digging up stuff from below (the spacecraft itself will maneuver to the other side of the asteroid for safety... and again, copper is used to distinguish it from the sample material). Once things settle down, Hayabusa2 will come back to that site and gather a sample from the crater left by the impactor. This is planned for April.
Tantalum is an extremely dense, readily obtainable, machinable and hard metal.
Lead and gold are fairly soft an malleable and wouldn't retain their shape upon impact.
While tantalum is relatively safe to machine and be around, even depleted uranium has chemical toxicity. As @Uwe and Wikipedia point out, while Tungsten is slightly more dense it is also more difficult to machine.
For ultra-dense radiation shielding (different application than this) tantalum is in widespread use because of its extremely high density, machinability, and comparative safety around humans.
The Juno spacecraft around Jupiter also uses a tantalum radiation vault for it's electronics, likely for similar reasons; high density, machinability, obtainability, and no major health/safety risks. (see also If Juno's long orbit means a lower rate of radiation damage, why the planned short orbit?)
metal density (g/cm^3) Cu 9.0 Pb 11.3 (for reference) Ta 16.7 U 19.1 W 19.3 Au 19.3 (for reference)