"Payback was unavoidable," for past behavior perceived as anti-China, state media says.