On one side we have simple stand alone applications (aka Notepad, MS Word, desktop games), while on another side of the spectrum are highly integrated client-server/web applications with N-Layer distributed architecture. The latter might contain hundreds of pages, thousands of modules/functions and hundreds of thousands or millions lines of code.
Relatively small, straightforward stand alone applications can be easily automated using Commercial tools such as QTP. However, QTP less powerful language (VBScript has roots in Basic from 1960s) is often not sufficient for automation of modern sophisticated highly integrated software. It will be more efficiently done by Selenium WebDriver with its powerful languages such as Java or C#.
In addition, QTP forces the user to follow certain pre-defined routine. That prevents test automation engineer from automating complex test scenarios (required to test complex software), where flexibility of toolset is required.
It is not to say that QTP incapable of testing web based software. Of course it is widely used for this purpose. But it will take more time and effort to automate complex test scenarios using QTP than using Selenium.