I've always liked Python for web dev because it is a good general purpose language, it's elegant, and has good web frameworks. Some other languages are really good at the web but not much useful outside of that. So with Python if you are building something with data analytics and the web it's a perfect choice. Python pairs well with a lot of areas. It doesn't pair with everything well, such as, Javascript I think pairs better with robotics. And there are other good general purpose languages too (Javascript, Java, etc).
And to answer the question, it's mostly preference as to what language and stack to use.
Preference includes reasoning from: -Personal language preference -Available frameworks(and maturity of them for stability and support reasons) -Integration into existing code