TITLE: Motivation for definition of Quotient stack
QUESTION [13 upvotes]: I am reading "Some notes on Differentiable stacks" by J. Heinloth. In that paper, the notion of quotient stack is defined as follows.

Let $G$ be a Lie group action on a manifold $X$ (left action). We define the quotient stack $[X/G]$ as $[X/G](Y):=\{P\xrightarrow{p} Y, P\xrightarrow{f}X | P\rightarrow Y \text{ is a G-bundle,}  ~ f  \text{ is } G\text{-equivariant}\}$.
Morphisms of objects are $G$-equivariant isomorphisms.

I am trying to understand the motivation for defining in this way.

Given a Lie group action of $G$ on $X$, if I want to associate a stack, I  would start with simpler cases which allows me to guess how to define.

Given a Lie group $G$, I have stack associated to it, denoted by  $BG$, the stack of principal $G$ bundles.

Given a manifold $M$, I have the stack associated to it, denoted by $\underline{M}$ whose objects are maps $Y\rightarrow M$.


Suppose $X$ is trivial and $G$ acts trivially on $X=\{*\}$ then $[X/G]$ should only depend on $G$. We know what stack to associate for a Lie group $G$ i.e., $BG$. Thus, $[X/G]$ should just be $BG$.
Suppose $G$ is trivial and $G$ acts on $X$, $[X/G]$ should only depend on $X$. We know what stack to associate for a manifold $X$ i.e., $\underline{X}$. Thus, $[X/G]$ should just be $\underline{X}$.
Suppose $G$ is non trivial and $X$ is non trivial and that the action of $G$ on $X$ is such that $X/G$ is a manifold. We know what stack to associate for a manifold $X/G$ i.e., $\underline{X/G}$. Thus, $[X/G]$ should just be $\underline{X/G}$.
I am not able to guess how could we guess the definition knowing above three cases. Is quotient stack definition motivated from these simpler cases or Is it the case that simpler cases are special cases of notion of Quotient stack. How could we come up with such a definition. Any comments regarding the motivation are welcome.

REPLY [2 votes]: The nicest possible action of $G$ on $X$ is the free one, because in this case the quotient $X/G$ is a manifold or not far from a manifold, the map $X\to X/G$ is a $G$-principal bundle, and $G$-equivariant geometry on $X$ is the same as geometry on $X/G$. In short, the situation is as nice as possible.
The construction of the quotient stack $[X/G]$ is motivated by the desire to obtain such good properties in the non-free case also. Let me try to show how the definition of $[X/G](Y)$ comes naturally, say in the case that $Y$ is a point for simplicity. For this, we make the following observation. Fundamentally the quotient of a space by a group action is the set of orbits. Now if you think about it, an orbit is nothing else than the image of an equivariant map $f:P\to X$ where $P$ is a principal homogeneous space (a.k.a. a $G$-bundle), and we have a free orbit exactly when $f$ is injective. What is special with the case when $G$ acts freely on $X$ is that in this case any map $f$ as above has to be injective. But if you change slightly your conception of an orbit and if instead of the image $f(P)$, you focus on $P$ itself (understood with its mapping to $X$), then you somehow restore all good properties of free orbits — indeed, after all the action on $P$ is free! Therefore if we call orbit an equivariant map from a $G$-bundle to $X$, then $[X/G]$ is just the set of orbits. Now deriving the definition for fibrations over a general space $Y$ is easy.