If it is a secret then why is it visible on the box, invoice and the back of the phone? If it is not a secret then why does it have to be blurred when it gets posted online?

If it is a secret then why is it visible on the box, invoice and the back of the phone? If it is not a secret then why does it have to be blurred when it gets posted online?

As @Lighty said, the IMEI is a unique identifier for your phone (not the SIM card though, that would be the IMSI).
You can think of it as an equivalent to a MAC address in Ethernet. The IMEI could be spoofed to impersonate you / your phone. Your phone could get traced in a network using the IMEI (It actually is to maintain your connection). The IMEI is also used to find stolen phones, by comparing it to the IMEI DB of the GSM Alliance, for example.
Thus, to protect your idendity, and limit tracing to legitimate usages, it may well be worth it to not spread the IMEI out in public.
IMEI is like a GUID (Global Unique Identifier), that identifies your unique handset. Your carrier can blacklist your IMEI by instructing the GSM Alliance to do so, so that the mobile can't connect to any networks, usually in the case the handset is lost or stolen.
Your handset's IMEI is sent in the handshake process when connecting to a network, and can be searched in the global database by your carrier to identify the make & model of your device. This is useful as it allows the carrier to send over the correct internet/MMS configuration settings automatically, and may turn off promotional messages your carrier may send promoting the newest device if you already have that device.
You would not want to reveal your IMEI for the following reasons:
Scenarios:
If someone is sufficiently savvy with hardware and software, they could also potentially add a free-and-clear IMEI (say yours that you published online) to attach to a phone they stole from somebody or one that is used by a specific service provider. (some providers get pissy if they find out you unlocked their devices for example and will either deny you service or blacklist your IMEI for doing it specifically to a phone you got from them, or even claim you violated a user agreement and try to sue you) This is used sometimes in the process of unlocking devices (some software suggests that you go down to walmart, buy a 'throw away' phone just for the distinct -- but different-from-original -- IMEI. then after unlocking your device, you throw the one you bought away as only one device can use a given IMEI at any one time) So you publish yours, someone else with either the right kind of flash-able device or good hardware/software skills attaches it to their device (to get around billing issues, or unlock it or hide it as stolen) and then gets service on it before you do. When you try to enable yours, it already shows up as active somewhere else. You're SOL