As others have rightly noted AHK is amazing for what it lets you do on Windows.
I've easily saved/earned over 100k USD from AHK.
However, the AHK language is not the most pleasant to use.
That leads to question why isn't there something as powerful available in Python or say Lua. Yes there is https://github.com/pywinauto/pywinauto but in practice it did not work as well as AHK.
It is just WinAPI underneath so C# would be another choice if there was a nice wrapper library.
I guess the answer on why AHK is so popular is that it is ugly but it works.