I believe the word 'punishment' in the original post is a bit of a misnomer. These concepts are actually derived from the idea of positive and negative reinforcement. The main idea being, while it can be described as a removal of a stimulus, not all negative reinforcement is bad. An example would be, in classical psychology, a desired action is performed and an electric stimulus (shock) is removed. Along the same lines, positive reinforcement isn't always good. ex. A dog that has a tendency to wander out of your yard, has a shock collar around his neck that shocks him when he gets past a certain point. The shock is being given for an undesired action and therefor is the positive reinforcer.
I hope that made as much sense as it did in my head.
KK