As per 24.301...
When the UE is not registered in the tracking area of the current cell during the NAS signalling connection
establishment, the UE NAS does not provide the lower layers with the S-TMSI. If the UE has a valid registered
MME identifier from a previous registration, the UE NAS shall provide the lower layers with the registered
MME identifier.
So in this scenario when ue is making rrc connection with cell having not registed tracking area, UE will send random number in rrc Connection request and registered MME info in rrc Connection complete msg.