There's also something else. The best and brightest from these countries are rarely (if ever) retained in their homelands and end up migrating to one of the western nations.
Ultimately, regardless of how the high school education level might be, these countries win out.
University education fixes these problems. People who only finish high-school rarely do science later in life.