On planets, a space elevator goes to (geo)stationary[0] so that the cable doesn't wind up around the planet, but you can't do that on the Moon, because luna-stationary is occupied by the Earth, which inconveniently is too massive and spinning too fast to anchor the other side of the cable. However, the L1 point is also stationery relative to the lunar surface, and is the place where the gravity of the Earth and the Moon balance out.
[0] IIRC, geostationary specifically means Earth, but there's going to be some more general term for the same idea over generic parent objects and not just Earth
Although (and I wish I could find this again), I've read that lunar He3 is so diffuse that getting it out would incidentally give us so much purified aluminium, silicon, and oxygen, that sending all that back to Earth and magnetically decelerating it on arrival would give us more energy than the He3, as would burning those ingots with that oxygen.
[0] https://www.youtube.com/watch?v=3ZteJmg1TfM (10 minute video, relevant around 4:00)
Though you could equivalently try and go for Earth-Moon L1 with a counterweight on the other side of L1. It would be significantly more unstable though.
For Luna or Mars, gravity is reduced and the required diameter is less. Maybe it would even be feasible to build such an elevator if it were above the Earth. But now you're building above an alien plant, so you trade one set of potentially insurmountable obstacles for another.
I'm not sure that that system would be unstable in human timeframes since the two would be tidally locked, although it would certainly alter the engineering stresses in ways that I'm grossly unqualified to calculate. I think a portion of the cable might be under compression rather than tension? I guess it depends on the rotational speed of the whole system.
Speaking of which, substantial amounts of energy would need to be spent accelerating the spin of the Earth/space elevator system to maintain a 24-hour day/night cycle.
However, Luna's presence would perturb the whole system, either tearing it apart with tidal stresses or being ejected from the system before that could happen.
See Isaac Arthur's video about it here: https://youtu.be/dc8_AuzeYKE?t=470
Compare this to anything on mars. It'll be 3.6-4.0km/s to mars injection. Then 2.0km/s to low orbit (can be optimized with clever aerobreaking down to 1.0km/s). To the surface will be a minimum of another 0.4km/s (no engine, parachute only) and closer to 1km/s if you want a soft landing. So you can expect 5km/s at the bare minimum and ~7km/s along established "routes" leveraging to-be-existing infra.
So then the question becomes whether lower delta-v returns, regular launch opportunities, and shorter comms delay are more or less important than 1km/s delta-v savings.
I'd argue the delta-v savings aren't worth it on their own. Mars will eventually be worth exploring and it's a valuable opportunity but by every measure other than raw "throw it at the orbital body with no support or return plan" delta-v savings, the moon is a better site for initial extraterrestrial habitation studies.
Except that all that delta at mars is done with aerobraking/aerocapture. Inbound probes can crash strait into the mars atmosphere without slowing down for orbital insertion. That's why it takes far less fuel to get to surface of mars than the moon, at least with objects car-sized or smaller. Only with larger/heavier objects is mar's atmosphere so thin that fuel must be used for capture prior to descent.
In the following deltaV map, much of the trip to mars is a free ride so long as you follow the red arrows. There are no free rides on the way to the moon.
https://space.stackexchange.com/questions/2046/delta-v-chart...
In any case, bodies with atmosphere do enable you to effectively shave up to half of the delta-v for a transfer when you know what you are doing. :)
Looking at it from LLO isn't the number you should be using. It's the number from Lunar intercept orbits to landing.
Actually now that I think about it, if you want to save delta-v, you can get an extra 25% off the TLI leg of the direct route with a low energy transfer using weak stability boundary trajectories. These savings however come at the cost of a significantly longer flight time and far slimmer margins for failure.