It's not just that they are our allies (a nebulous term, anyway). The Saudis are allies, aren't they? It's not geographic proximity. We like Canada but we don't like Mexico. It's not latitude, either. Again, we like Canada but we don't like Russia.
Language and culture, primarily. Anglophone countries come out on top.
The great white north, with scoring for aspiring immigrants and minimal international meddling (they sent a general to Rwanda a couple of decades ago, didn't they?) even manages to beat out the place that spawned us.
Great Britain meddles some, but at least they tend to be on our side. Israel excepted, the rest of the countries we like mostly keep to themselves (and like the Kingdom of Jerusalem nine centuries ago, its attempts to rope Europeans into bailing it out are entirely understandable if we put ourselves in
The ones that challenge us--and I use "us" and "we" in this context for convenience, not out of a feeling of personal solidarity with our federal government and its priorities--are the ones we don't much care for: Russia with its hetero-fascism; China with its currency manipulations, cheap consumable dumps, and pushing of the military envelope; Mexico with its exportation of its unemployable social problems north of the border in return for tens of billions of dollars every year; Saudi Arabia for its inhabitants' tendencies to so often knock things down and blow things up.
Mexico is especially remarkable since our national media pays it so little mind (not for lack of demand). When it does come up, it is generally apologized for. The other bottom feeders, in contrast, are countries elites on both the left and the mainstream right aren't too keen on. No amount of sweet talking is enough to make people ignore what they're own lying eyes tell them about Mexico's contemporary contributions to the US. Additionally, Mexicans comprise a larger share of the foreign-born residing in the US (and thus participating in Pew's survey) than residents from any of the other countries considered do, yet even with this putative home team boost, Mexico still gives a poor showing. US' natives really aren't enamored of the place.
Parenthetically, from its inception in the early seventies through 1994, the GSS asked respondents how warmly they felt towards England, Brazil, Japan, Israel, China, and Russia. The higher the nation's score (which I've inverted, 0-9, for ease of comprehension from the survey's results), the warmer the feelings of the American public are:
Every day things change but basically they stay the same.
GSS variables used: ENGLAND, BRAZIL, JAPAN, ISRAEL, CHINA, RUSSIA