It was largely a question of the existing codebase. It took years to convert all the obscure scientific libraries from Python 2 to Python 3.
The migration was no easy task. So all the projects already written in Python 2 remained on version 2. Until the day they reached a dead end and were forced to migrate.