BEIJING—Google’s threat to withdraw from China over censorship and cyberspying is a sign of a growing willingness among foreign companies and governments to overturn the conventional wisdom that has defined decades of engagement by the West: that China is so big that it must be accommodated.