I used to think Mega Evolution was so powerful that Ash needed one of his own to counter it, but i also realized i was basing this off Alain, and his overpowered Charizard X which I should not have done.
Mega Evolution does make a pokemon stronger but it's not something that guarantee's victory in battle, i mean we've seen Mega's beaten by standard pokemon on several occasions, even if it took more than 1 to do it, sure some of those encounters were due to Z-moves, but gimmicks alone don't always equate to wins.
on the other side, you have to realize the Dragonite species has always been shown to be buff in the anime, taking extreme measures in combat to be beaten because of their high endurance, and let's not forget as well that when you look back at the chaos iris dragonite was capable of in it's first couple of fights where it was untrained and took down pokemon who had type advantage over it, I would say Ash's, which was actually used to capacity beforehand has more breathing room.
in the context of this battle, Mega Lucario might have had more power, but in the end Dragonite had more endurance which is why it was able to win, and again Lucario was only use moves that were not very effective against Dragonite, if it had any other form of attack it could've pulled off a win, but that's not what happened.
The writers are at fault for not giving Korrina's Lucario any new moves to work with leading to it's loss, Dragonite can't be held responsible for that.