[1] Uncrewed space probes have used this method to collect data on Mars, as opposed to orbiting or landing.
[3] One application of a Mars flyby is for a human mission, where after landing and staying on the surface for some time the ascent stage has a space rendezvous with another, uncrewed spacecraft, that was launched separately from Earth, flying by.
This would mean the ascent stage of the lander to reach the speed necessary equal to that of the spacecraft flying by, but the resources needed for Earth return would not have to enter or leave Mars orbit.
[10] Although this was a very distant flyby it did succeed in taking multiple infrared spectra with its MICAS instrument of the planet.
[11] Both MarCOs reached Mars and successfully relayed data during the entry, descent, and landing phase of Insight on November 26, 2018.