Python 2 is deprecated and you should no longer use it. However, many older tools (especially hacking and pentesting tools) are written in Python 2 and have not yet been or will never be updated to Python 3. So, until new tools have replaced the old ones in the year 9001, we need a way to run the old tools on an otherwise current Linux distribution.
There's an official guide by Offensive Security. Follow it to install pyenv
: https://www.kali.org/docs/general-use/using-eol-python-versions/