Geez, I take five hours off for a date with my wife and the world falls apart! (I'm going to the desert for the weekend also - no questions answered Sat/Sun, either. )
Your dealer's service advisor is a guessing, undertrained goof. Reboot indeed.
1) The I6 engine was designed without a traditional PCV valve, so crankcase blowby gets the back of the throttle body throat horribly dirty/sticky.
2) The PCM has a built-in table in memory that predicts the angle it will have to place the butterfly valve to obtain certain RPMs. It has a feedback loop that tries to keep the RPM constant, especially the 600 RPM idle speed, under varying loads, especially the on/off load of the AC compressor. But it's more successful at nailing the RPM exactly if it customizes this memory table slightly according to what it sees the performance actually being. This is called an adaptive process.
3) The PCM also controls when the AC compressor cycles on and off. So it can bump up the airflow and fuel injector duty cycle to anticipate the compressor load it's about to add. If it didn't anticipate, it would be lagging, and in a control loop that results in overshoots (temporary too-high RPM) and undershoots (temporary too-low RPM).
4) As a vehicle ages and the throttle body gets stickier and stickier, the PCM slowly adapts as best as it can. Eventually, the stickiness causes so much hysteresis that the PCM can't adapt any more, and the former smooth idle performance gets erratic, with overshoots and undershoots, and gets to the point that the engine can just stall and die when the AC compressor kicks in. When the AC is off, the PCM can handle the throttle better because the butterfly valve isn't moving as much, if it even needs to move at all. The PCM can handle tiny RPM changes with fuel injector changes alone, without needing to move the relatively large (physically) butterfly valve. A vehicle whose idle gets bad after 30-60K miles has this going on.
5) A vehicle whose throttle body is getting sticky, but which hasn't gotten to the point of erratic idle, is at risk of losing its adaptive table in memory. This happens when the battery gets disconnected for any reason. The PCM goes back to square 1. It has the factory built-in table of butterfly valve performance, but the throttle body is now horribly sticky. The adaptive algorithms in the PCM programming can't handle real-world performance that's so much different than the engineer's models predicted. If the engineers knew the engine would be depositing so much tar on the throttle body they would have given us a PCV valve. So the formerly well-running engine with an idle table that had been developed slowly over time (even though the throttle body had been deteriorating), is now presented with a too-sticky throttle body and it just gives up. It wasn't programmed to be THAT adaptive, so it reverts to the factory programming. And that, combined with the sticky throttle body, can't accommodate the AC compressor's varying load. But it can do OK with the no-compressor mode.
Sorry for the long technical essay, but so many people demand it that I might as well write it down (again) so maybe I can find it myself in a future search. I agree it *is* a counterintuitive result after a battery disconnect.