Swords Dance Mega Lucario has a favorable matchup against stall teams for a number of reasons.
1. These teams like to use multiple Pokemon that Mega Lucario can set up on. For example, Water Arceus are often seen on stall teams and the standard set is actually outrun by Mega Lucario once it Mega Evolves, as they tend to prefer investing in Defense more than Speed for checking +1 Mega Salamence as opposed to the rarer Mega Lucario. You can beat Water Arceus 1v1 even if they have Judgment so long you're completely healthy, and if they don't have Judgment, it gives you a free Swords Dance. Mega Lucario can also set up for free on Lugia, so if you can attack it on the turn it phazes you out & you get a good Whirlwind roll, so should be able to break by Lugia the next time it comes in barring an Iron Tail miss. Tyranitar, Blissey, most Clefable and other support Arceus formes with Toxic > Will-O-Wisp are more examples of Pokemon that Mega Lucario annihilates / sets up on. Even if Clefable or Blissey have something odd like Thunder Wave or Fire Blast to hit Lucario with, they're rarely gonna stay in, especially if they need to check something else on Lucario's team.
2. Mega Sableye is helpless against a +2 Iron Tail and thus cannot reliably check Mega Lucario like it can some other physical threats.
3. Wreckdra's post was good and highlights other advantages Lucario has against Stall; it has a 4x resistances to Stealth Rock and usually will not need to worry about taking Spikes damage, as Stall doesn't use Klefki and rarely finds room for Spikes on Ferrothorn in this metagame. Lucario is easy to kill with brute force; it is much harder to dispose of passively.
4. Toxic immunity! This is absolutely huge and ties into points #1 (# of Pokemon it can set up on) and #3 (hard to beat with passive damage).
Without Swords Dance, you cannot bust through Lugia reliably and have a much tougher time with MSab and Judgment Water Arceus, amongst others. Considering the severe damage a +2 Close Combat deals even to Fighting resists such as Ho-Oh, you don't really need a 4th attacking move; Close Combat, Iron Tail, and Bullet Punch are sufficient and Iron tail deals as much damage to Lugia as Stone Edge anyway. No, the 5% accuracy raise is not enough to justify using Stone Edge on a Pokemon that MUST run as optimal and consistent a set as possible to even begin justifying its use.
Not addressing Extreme Speed Lucario apart to say that it doesn't even outdamage Adaptability Bullet Punch, and the dreaded Normal coverage it offers actually doesn't help very much!! A +2 Close Combat outdamages a +2 Extreme Speed even on resists like Ho-Oh and random stuff like Poison Arceus.
Mega Lucario isn't that deadweight vs. offensive teams, because Bullet Punch is nice for picking off weakened GeoXern (allowing offense to run a different Arceus than EKIller, like a SD Groundceus). It can also switch into most Darkrai after it sleeps something, although LO Focus Blast / Thunder variants obviously bop it. Unfortunately, it cannot check Extreme Killer at all, loses to most things on offense 1-1, and prevents you from using Mega Salamence or Mega Gengar. I use Mega Lucario more often than most people, and while it's VERY average and rarely fits onto any good team, the Swords Dance set is its only chance to carve whatever tiny niche into this tier that it has.
Anyway, I think we're done talking about this Pokemon. It really isn't relevant enough to spark this much discussion.