Motivation for definition of Quotient stack

Let's start approaching the question from the simplest possible case $Y=*$. What should be the points of $[X/G]$?

Recall that the idea here is to generalize the construction of the action groupoid for discrete groups acting on sets to the manifold case. This allows us to remember the stabilizers of points and it is generally a much better behaved notion.

So morally $[X/G](*)$ should be the groupoid whose objects are points of $X$ and such that $\mathrm{Mor}(x,x')=\{g\in G\mid gx=x'\}$. With this description however it is a bit unclear how to generalize that to get a description of $[X/G](Y)$, so let us rewrite it in a slightly different way.

A point of $X$ is just a $G$-equivariant morphism $G\to X$ (since any such $G$-equivariant morphism is determined by the image of $e\in G$). Moreover a morphism between $x:G\to X$ and $x':G\to X$ is exactly a $G$-equivariant morphism $g:G\to G$ (i.e. right multiplication by some element $g\in G$) making the obvious diagram commute. Now if you look at the definition, the groupoid does not depend from the fact that $G$ has a canonical basepoint (the identity element $e\in G$), so in fact we can write

$[X/G](*)$ is defined as the groupoid of $G$-equivariant maps $T\to X$ where $T$ is a freely transitive $G$-space.

Ok, so now we want to describe the groupoid $[X/G](Y)$. Intuitively the objects here should be families of elements of $[X/G](*)$ parametrized by $Y$. But a family of freely transitive $G$-spaces is exactly a principal $G$-bundle $P\to Y$, and a family of $G$-equivariant map $P_y\to X$ for each $y\in Y$ is just a $G$-equivariant map $P\to X$. Hence we get the definition you are asking about.


Let me detail the following case: $G$ is a Lie group that acts freely and properly on the manifold $X$. Classical theorems in differential geometry state that the quotient is a manifold and that $X\rightarrow X/G$ is a principal $G$-bundle. Then as I said in the comments, given a principal $G$-bundle $P\rightarrow Y$ and a $G$-equivariant map $f:P\rightarrow X$ then at the quotient $f$ induces a map $g:Y\rightarrow X/G$, simply because $P/G=Y$.

Conversely, again in this situation for the action of $G$, let's take a map of manifolds $g:Y\rightarrow X/G$. Since the bundle $X\rightarrow X/G$ is locally trivial one can lift locally on $Y$ the map $g$ to a map $U\times G \rightarrow X$ (with $U\subset Y$) which is $G$-equivariant, seeing $U\times G$ as a trivial principal $G$-bundle. Such a lift is not unique: you can change it by an automorphism of the principal $G$-bundle $U\times G$. Glueing these lifts defines a principal $G$-bundle $P$ over $Y$ together with a $G$-equivariant map $P\rightarrow X$ lifting $g$. This corresponds exactly to the descent theory for principal $G$-bundles.

Let me add also that the theory of stacks is made so that, without any assumption on the action of $G$, $X\rightarrow [X/G]$ should be a principal $G$-bundle. More precisely, this means that for any map $Y\rightarrow [X/G]$, the fiber product in the category of stacks $Y\times_{[X/G]} X$ is in fact a manifold $P$ and that the projection $P\rightarrow Y$ is a principal $G$-bundle (in other words the principal $G$-bundle $X\rightarrow [X/G]$ pulls back to a principal $G$-bundle $P\rightarrow Y$ in the usual sense). This is the standard way of defining geometric conditions for stacks and morphisms between them: by pulling it back along a map from a manifold. This forces you again to take this definition for the stack $[X/G]$.


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.