"The starting point, though, is that the defining features of stacks capture two crucial principles from physics: the gauge principle, and locality.
The gauge principle means that we need to keep track not just of connections, but gauge transformations, which form respectively the objects and morphisms of a groupoid.
“Locality” means that these groupoids of configurations of a physical field on spacetime is determined by its local configuration on regions as small as you like..."