I think the fact that the students in the school are predominantly Black matters. Their teacher thinks so too, which is why he wanted them to have heroes who look like them and come from similar backgrounds as theirs. In statements he's made to the press, he said that was his motivation for putting the pictures up. I think he's right to have done that. Representation matters.
I do not think that working to give Black students Black role models would mean it's OK to take down images of Black people at schools with mostly white students. One does not follow from the other.