I use Illustrator lightly for 10 years but never know it support Applescript, will take a look at it.
It has pretty good AppleScript coverage (from looking at the dictionary) but I've never used most of it.
Mostly used AppleScript to call 'do javascript'.
The AppleScript support was there maybe even before Illustrator was available for Windows.
Not going to look at either API. And, I don't have a current Illustrator.
...but I can guess with certainty that the javascript API gets more attention within Adobe. And that it has a more solid future.
AppleScript may never disappear from Illustrator or macOS. But it _does not_ have a bright, vibrant future.