Yeah they did show how his Charizard got that powerful. While he got his Charmander, he was only Sycamore's assistant. He was searching for Mega Stones, when he bumped into Lysandre. For the ownership of the stone, Alain fought Lysandre, and lost. Lysandre then tempted him to join him by giving him the Key Stone and Charizardite X. Due to this, Alain trained his Chameleon to Charizard, and has visibly been shown in the Mega Evolution series to have incredible feats. You say Ash has beaten Articuno and Brandon's Regis. Well Alain has beaten an Elite Four's ace, which actually trumps Ash's feats. And are you comparing Articuno and the Regis with the Primals? They're a completely different set of monsters. It doesn't matter that Alain hasn't competed in a league like Ash, but, he was visibly shown training and growing with his Charizard by beating Mega Evolution trainers, so he's actually more experienced than Ash.
In the end, both the trainer and Pokémon's experience matter. Given Ash's experience at this point, even every new region's Pokémon can be trained efficiently by him. In Lillie's case, not only is she a newbie, but so is her Vulpix. So let's say Ash has a Decidueye, and Lillie an Alolan Nintetales, despite both being from Alola, you'd still expect Decidueye to win because Ash as a trainer is more experienced than Lillie.