If nothing is focused on a page and you start typing, the browser can assume you’re looking for text on the page. Why else would you start typing into thin air?
Why is this important? Because some sites listen for keyboard and snag the cmd+f. This makes it impossible to search text on a page.
Firefox has this nice option: