The language that Mark Twain used seems selected specifically to be offensive - not to the people who were the fictional targets in the book, but to the real live people who used that language in their daily lives. To expose them as ignorant, nasty human beings who used that language to denigrate others.