what "should", in your opinion, be unset... %A or %B, or both? I don't think it's clear in that example which would be the intended behaviour-- which is probably why mIRC chooses none.
Well it's not a case of global versus regular, but rather a case of global versus local.
A local variable only exists within the scope it is created - it is only accessible within the function/event/etc that created it and it is immediately unset once that function/event/etc ends. Global variables are accessible from anywhere and are permanent unless explicitly unset with the unset command.