First of all, I am curious as to the source behind your statement that 19 of 24 states “did not want” African Americans after the Civil War. I assume that you are referring only to Northern states, as there were actually 36 states in the US after the Civil War. Eleven states seceded during the war, which means there were 25 states that were not part of the Confederacy. In addition, I know of no objective way of saying that some of the Northern states “did not want” African Americans while others did.
If, however, we assume that your premise is correct, I would argue that Northern states did not want African Americans because America was a very racist place in those days. We typically say that the Civil War was fought to free the slaves, and this is true to some degree. However, it was not fought because Northerners believed that African Americans were equal to them or because they wanted to give African Americans equal rights. Instead, most Northerners were deeply racist, taking for granted the idea that white people were inherently superior to black people.
Because of this, there were many people in northern states who did not want African Americans in their states. The Territory of Oregon (before it was a state) went as far as to pass legislation banning free blacks from settling in the state. Indiana also barred African Americans. Clearly, there were states where many white people did not want black fellow-citizens.
There are two related reasons for this. First, there was simple racism. Whites did not like blacks and therefore did not want them around. Second, and perhaps more importantly, there was racism mixed with economic factors. Many whites felt that African Americans who came into their states would compete with them for jobs, farmland, and other resources. They did not really mind competing against other whites, but they did not want to have to compete against blacks as those were not people “like them.” For these two reasons, many people in northern states did not want African Americans in their states after the Civil War.