Hi Tomi,
Just to make sure we are discussing the same 'code'. There are two codes:
1. The RADIO code. This is a 4 digit code that every radio (uConnect) has built-in that must be entered on the radio screen when connected to a car the first time. The purpose is that if someone steals the radio, they cannot inset it into another car without the code. When the manufacturer puts a brand new radio in a car, the radio code is entered on the screen. The radio reads the car's VIN number (from the Body Computer through CANBUS) and saves the VIN internally in the radio in static memory (the memory survives disconnection from power). From that point on, the radio will only work on that car. The radio reads the VIN from the Body Computer every time you start the vehicle. If the VIN matches, it radio works. If it doesn't, you get a message on the radio upon startup asking for the code. This is why if you buy a used radio off, say, eBay, you need to get the radio's code because the first time you start the car after putting the radio in your dash, you will be asked for the code. Getting this code is not difficult. While you can get it from the dealer (probably with a lot of wait, hassle etc.), you can generally buy the code on eBay and other websites for ~ USD $20. The code is associated with the serial number of the radio.
2. The KEY/IGNITION code. This is a code for starting the car. I'm not 100% sure but I think this is a 5 digit code. The purpose is to prevent theft of the car. The code is used by the ignition module of the car (the key slot or push button depending on which Cherokee you have) and the key fob. If the code of the fob matches what the ignition module expects, the car starts. If not, the car doesn't start. Usually you can get this code from the dealer (here in the States they will require to see the registration of the car in your name to make sure you are the actual owner). Some locksmiths have access to do it (again, they are supposed to verify you are the actual owner of the car).
Which of the two codes are you referring to?