Here's your reason.....
Your computer is freaking out(so to speak). Basically, brakes work because of vacume that is used from the motor.... if you let off the gas... and coast to a stop(which most likely you have done), your computer doesn't know what to do... let the motor die down to lower rpm's or keep rpm's up to a grand or so to let you have a reasonable amount of vacume left inorder to brake as needed. Your computer is confused on what you wanna do. The reason it doesn't do that while your a/c is on is because it takes so much rpm to keep that a/c pumping... and well.. if the engine is already going enough for the a/c to be operational... your computer knows that that is ALSO enough vacume inorder for you to brake as needed.
Next time that happens... just tap the brake relatively rough... let off.. and brake as normal.. this should wake your computer up... by giving him a definate answer to his question.... that you are indeed brakeing. This will stop that fluxing of rpms and rough idle at a stand still.
Paul