Although prior to the stop the cops could not have known about the gun, it may however have played an important role in subsequent events. The driver certainly thought he had reason to keep it handy, rather than secured in the trunk. Additionally, the presence of a gun in close proximity to the driver may explain why it took a mile to pull over (which is what alarmed the cops) and why the driver refused to exit his vehicle (the gun would have been visible).
Seems to me the presence of the gun goes a long way toward explaining the driver’s noncompliance.
There is no “trunk” per sé in an SUV. And if you’re “permitted” there should be no need for it to be there.