The runtime pseudo relocations can't handle the AArch64 format PC relative addressing in adrp+add/ldr pairs. By using stubs, the potentially dllimported addresses can be touched up by the runtime pseudo relocation framework.
The MachineOperand TargetFlags range (8 bits) is just about exhausted; this allocates the last bit to MO_COFFSTUB. (In the X86 target, the TargetFlags are just direct values, while most of it is used as a bitfield on ARM and AArch64.) An alternative, to conserve bits, would be to use MO_GOT (which doesn't have much meaning in a COFF context right now).
Currently in the AArch64 target, the MO_GOT flag is set for any indirect access (so we have MO_GOT | MO_DLLIMPORT or MO_GOT | MO_COFFSTUB).
I don't see why it matters whether the value is a GlobalVariable, specifically, as opposed to an alias or function.
I don't see why this applies specifically to MinGW, as opposed to all Windows targets.
I'm not sure what the point of the isDeclarationForLinker check is... it seems redundant with the isDSOLocal check.