The shooter was motivated by racist beliefs and aimed to target the African American community, as evidenced by a manifesto he posted online prior to the attack.