Purchasing a phone with a bad ESN can be a great way to buy fantastic phones at discount prices. Before purchasing, please be aware of what bad ESN means as well as its limitations.
ESN stands for "Electronic Serial Number." It is a unique identification number that allows phones to access a particular cellular network.
If a phone has a "bad ESN," that means the phone cannot be activated on a particular carrier. For example, if you purchase an iPhone with a bad ESN from AT&T, then you won't be able to activate that phone on the AT&T network`.
A bad ESN iPhone will still work as an offline wifi-iOS device. As long as the phone is iCloud unlocked, it may also work on many non-US carriers.