My take is that Python won by having a complete ecosystem centralizing many tools that were dispersed in different languages:
- Numpy/Scipy/Matplotlib enabled scientists to do data analysis with Panda similar to what was available in R
- PySpark enabled big data scripts in Python instead of Scala
- PyTorch made Torch available for non-Lua users
Bit by bit, more people got used to doing data analysis and AI research in Python. Some projects were even written for Python first (e.g. Tensorflow or Keras). Eventually, Python had so many high-quality packages that it became the de facto for modern AI.
Is it the _best_ language for AI, though? I doubt. However, it is good enough for most use cases.