The IMEI (or MEID) is indeed flashed into the device at time of firmware burn-in. I have heard of utilities to spoof IMEI numbers but I strongly recommend against using them.