This might seems like a bit of philosophical question and so maybe if I keep reading a bit more, I might get my answer. But, I ask nonetheless.


In my attempt to study Shimura varieties, I came across the definition of a locally symmetric space associated to connected reductive group $G/\mathbb{Q}$ as follows:



> 
> Let $A\_G\subset G$ denote the maximal $\mathbb{Q}$-split torus in the center of $G$ and $A\_\infty=A\_G(\mathbb{R})$. Let $K\_{\infty}\subset G(\mathbb{R})$ denote a maximal compact subgroup. If, for any topological group $\mathfrak{G}$, the connected component of the identity is denoted by $\mathfrak{G}^\circ$, then we define $$X=G(\mathbb{R})/A^\circ\_\infty K\_\infty^\circ.$$ Now, let $\Gamma\subset G(\mathbb{Q})$ be a subgroup such that $\Gamma\cap G(\mathbb{Q})\cap \operatorname{GL}\_n(\mathbb{Z})$ has fintie index in both $\Gamma$ and $G(\mathbb{Q})\cap \operatorname{GL}\_n(\mathbb{Z})$ for some faithful representation $G\hookrightarrow \operatorname{GL}\_n$. The locally symmetric space is defined as $$ X(\Gamma)=\Gamma\backslash X. $$
> 
> 
> 


My question is basically, **why?**


Intuitively what is this trying to achieve? As in, why are we quotienting out by $K\_\infty^\circ$ and $A\_\infty^\circ$ (maybe this is the least we need to do to ensure some kind of compactness-like result, or better cohomology groups)?


I do have some familiarity with moduli spaces of elliptic curves with level structures and I know that we can get examples using this construction (which helps construct Galois representations using certain modular forms), but when I see this construction, it just looks like generalising without any end goal in mind (which is obviously not true and why I said I should probably keep reading rather than ask this question — but I cannot help myself).


I am sure the question sounds vague, but I just don't have an image in mind when I think of these locally symmetric spaces and it would greatly help it someone could help fix that.



Definition of locally symmetric space of reductive groups
There is a very natural, intrinsic definition of a "symmetric space", as a manifold (Riemannian or Hermitian) with an extra symmetry of a certain prescribed type. It is then a *theorem*, not a definition, that all such objects have the form $G(\mathbb{R}) / A\_\infty^\circ K\_\infty^\circ$ for a reductive group $G$. You can find this perspective, for instance, in Milne's "[Shimura Varieties and Moduli](https://www.jmilne.org/math/xnotes/svi.pdf)".


From this perspective, *defining* a symmetric space as $G(\mathbb{R}) / A\_\infty^\circ K\_\infty^\circ$ is rather misleading. It's common to define it in this way in number-theory texts, because it avoids wading through large amounts of quite intricate (aka: beautiful) differential geometry before getting to the number-theoretic parts of the theory; but it makes the motivation highly non-obvious.


(*Edit*: Just to clarify, this is about *symmetric spaces*, not *locally symmetric spaces*. A locally symmetric space is the quotient of a symmetric space by a discrete subgroup of its automorphism group $G$, so once you understand the motivation for symmetric spaces, the motivation for locally symmetric spaces should hopefully be clear.)


