This supposes that nothing is happening in the background while the B drive is connected. It could be sitting there doing a scan every X minutes and storing that to Drive A. In fact, it probably is.
Actually the problem is that pesky old registry.
The registry essentially keeps a log of all the software you have installed whether it's on C: or Z:....