sometimes they ban you *because* you are sending them private messages
BAN may not always mean you will then be kicked from channel. BAN is sometimes used as a way to mute an abusive nick, since banned nicks cannot speak in channel.
I'm not seeing the advantage to /part from a channel as soon as you are banned, especially if it prevents you from seeing the "reason" in their kick message.