The Dutch have a long and proud history of enslaving the black race. Zwarte Piet is a relic of the golden times.
In all seriousness, St. Nicholas' Zwarte Piet's origins are still shrouded in mystery. No one really knows. Like chronic suggests, it may be a relic of a heathen ritual, it may literally represent a (black) slave, or it represents a generic helper who is black from the soot since he's crawling up and down chimneys all the damn time (no way Nicky boy is gonna do that himself with his shiny white-n-red dress).
The simple fact is that during the ages (since the St. Nick festival exists) Zwarte Piet represented many a thing from pre-Christian devil to a wise helper. There is no one particular reason or explanation for Zwarte Piet. He just is.