An oversimplified explanation is that AC has less transmission losses over medium distances while high voltage DC has less transmission losses over extremely long distances. I found this stack-exchange post that goes into some of the details better[1]. It also explains some other advantages of DC.
[1] https://engineering.stackexchange.com/questions/19758/transm...