The ESN is "bad" if the carrier has blocked it for some reason such as non-payment, being reported lost/stolen.
CDMA carriers are very much apt to do this.
GSM carriers not so much, but sometimes they will.
On BlackBerry devices the PIN can be "bad" if the device was a pre-release device or some other sort of device that wasn't intend for the retail market.