To Kill a Mockingbird is a beautifully written book about a particular period of time, and about white people, and it isn't anything like perfect. It exposes, intentionally and unintentionally, problems in our society. So does Mark Twain's novel Huckleberry Finn. It's a beautifully realized portrayal of a society that included seriously ugly racism.
Banning either of these two books wouldn't destroy the racism they document, it would erase it. Kids are more than smart enough to learn from period literature. Especially when a teacher is thrown into the mix.
Should we be teaching other books too? Of course! But banning books is just not an answer to anything.