The US Justice Department says the alleged shooter was driven by a desire to “prevent black people from replacing white people”.