First off, lunar orbits tend to be unstable due to mascons (mass concentrations, which are places of higher density produced by impacts with the moon that cause it to have a non-uniform gravity field). That means that anything not placed in very specific orbits which weren't discovered until 2001 (frozen orbits as referenced by the first link above) will shift over time, possibly resulting in impact with the lunar surface.
Because the reason they're decoupling from it before burning to return to Earth is so they don't have to spend the fuel to bring back the no longer needed ascent module they really don't have many options on what to do with it. They have some fuel remaining (because everything was planned with some margin for error), but the options boil down to:
- Use remaining fuel to intentionally impact the surface.
- Use remaining fuel to maybe get it out of lunar orbit (depending on amount of fuel left).
- Not use the remaining fuel, which eventually results in orbital decay due to pertubation effects.
As for specific flights:
After being jettisoned, Snoopy's ascent stage engine was fired to fuel depletion, sending it on a trajectory past the Moon into a heliocentric orbit.
I have no real source saying so, but "fired to fuel depletion" sounds like an engineering test to me, especially with the further comment that they tracked it until 1969 meaning they could have calculated how much delta-V they got out of the engine/fuel. For what it's worth, this forum thread agrees it was "for data purposes".
The wikipedia link also mentions that
In 2011, a group of amateur astronomers in the UK started a project to search for it.
Unfortunately solar orbit is an awfully big place and the ascent module is small and no longer transmitting. I admittedly didn't search for long but I didn't find any suggestion that it's been found/identified.
This one was left in lunar orbit as you noted and was estimated to have "decayed within months". Even the mission summary just says that the "ascent stage would remain in lunar orbit for an indefinite period". Without the geophones/seismometers planted on the other landing missions there was no specific need to create an impact event so it seems it was simply abandoned because there was no useful science to be produced by further maneuvering.
These flights left seismometers on the surface for the purpose of lunar seismology.
Part of the deployed package was the "Active Seismic Experiment", or ASE, which was had a mortar to launch explosive charges for the purpose of creating shockwaves that would be picked up by geophones to analyze the subsurface structure of the moon. Crashing things into the moon once the geophones were in place was for science to measure how the shock waves from the impact propagate through the moon. As noted here for Apollo 12:
The seismometers the astronauts had left on the lunar surface registered the vibrations for more than an hour.
As mentioned in comments and from the ALSEP page, despite the mission abort and focus on saving the crew the S-IVB stage from Apollo 13 "was deliberately crashed on the Moon to provide a signal for the Apollo 12 PSE" (Passive Seismic Experiment).
In the "And Return" section:
This may have been partly responsible for the likely failure to leave one of the switches in Orion in the been correct position when the crew carried out their final checks. Consequently, when Orion was jettisoned from Casper, it began tumbling and did not fire its RCS thrusters in preparation for the engine burn to remove it from orbit.
It sounds like they intended to use it as an impactor but were unable to. It did eventually decay nearly a year later but that wasn't the original plan.
I'd guess they intended to use it as an impactor but were unable to.