It's a phenomenon called "cascading terrorism." It is, essentially, a type of one upmanship among a group of like minded individuals, in this case, members of white supremacist or other racially intolerant groups who participate in discussions on anonymous forums on 4chan and 8chan. These members post their manifestos or diatribes, then go and carry out attacks, spurring other members to do the same, in the name of "the cause."
ISID and Al Qaeda operate in a similar manner, although those organizations have known leadership as well.
What is happening in America is largely being done anonymously online by cowards.
Mental illness is largely absent from the types of people who do these things, as violence towards others is not typically associated with the majority of mental illnesses. It is just pure hatred and evil, along with a lack of empathy and value for life.