Why did black soldiers often face greater hardships than white soldiers

2 answers

Well, to start with the worst imagine being a black Union soldier captured by the Confederate Army. Of course there was much more resulting from discrimination against black people in the Northern states even if they did not allow slavery.
https://blackamericaweb.com/2018/05/28/little-known-black-history-fact-black-civil-war-soldiers/