When you use the Google web page to do searches while you're logged into GMail or other Google services, it uses information about your browsing history to modify the results. It can't do that with an API, since it assumes you're doing it for somebody other than yourself.
Also, as @Walden mentioned in his answer, you may be hitting different servers for the two queries, and Google does a "slow sync" between the servers so they might not all have the latest search database or the latest version of the page ranking code.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…