Search engine results can often return over a million web pages. It can be frustrating when you click on a few results, only to find they are selling products not available in your country. If you were a UK resident, you would assume that a domain with a .uk extension was British, and would be most likely to select that one if listed in the results. In addition, one of the factors used by search engines such as Google is to prioritize local results, so that a .uk extension may appear higher than website domains with other extensions.
A further aspect to help explain domain name extensions in relation to search engine optimization is the use of the domain extension as a keyword. In order to narrow down search results, a potential visitor to your website might use a keyword phrase containing the country, for example "dolphin trainers us". When the domain extension is .us, this helps give the website a priority in search engine results. When the visitor sees the US domain extension, they will be more likely to click through to the website, as they know it will be an American site.