The US students going to St Andrews presumably can’t get into really top school in the US or UK. In the US, smaller elite colleges tend to have students from wealthy and classy backgrounds, and may have more severe ethnic quotas and be difficult to get into if you went to a high school that didn’t provide good preparation. Many people view it as a status thing to send there kids to those types of schools. A university favored by the royal family would be presumed to be classy, and you could impress people in the US by telling them your kid is going there.