TITLE: Why are $S$-arithmetic groups interesting?
QUESTION [11 upvotes]: Let $K$ be a number field and $S$ a finite set of valuations of $K$, including $\infty$.
Define the $S$-numbers $K_S$ to be the direct product $\prod_{s \in S} K_s$ where $K_s$ denotes the completion of $K$ at the valuation $s$.
Define the $S$-integers $\mathcal{O}_S$ to be the subset of $K$ consisting of the elements $x$ such that $|x|_s \leq 1$ when $s \notin S$.
Example: Let $K = \mathbb{Q}$ and $S = \{\infty, p_1, \ldots, p_n \}$. Then we have
$$K_S = \mathbb{R} \times \mathbb{Q}_{p_1} \times \cdots \times \mathbb{Q}_{p_n}$$
$$\mathcal{O}_S = \mathbb{Z}[p_1^{-1},\ldots,p_n^{-1}]$$
Note that these rings come with topologies induced from the topologies on the completions $K_s$.
Furthermore, we can define algebraic groups over $K_S$ such as, for example
$$\mathbf{GL}_m(K_S) = \prod_{s \in S} \mathbf{GL}_m(K_s)$$
Here are my questions:
Why is it interesting to study groups in the $S$-arithmetic setting such as $\mathbf{GL}_m(\mathcal{O}_S)$ or $\mathbf{GL}_m(K_S)$?
In particular, is there some classical problem that is solved by using $S$-arithmetic groups, or one that served to launch the study of $S$-arithmetic groups? Perhaps some relevant (famous) names would be Borel, Harish-Chandra, Siegel, Weil, Tits, etc.
It is easy to believe that number theorists would be interested in studying a ring such as $\mathbb{Z}[p_1^{-1},\ldots,p_n^{-1}]$, although I don't really know why and I would like to hear more.
I am also aware that $\mathbf{GL}_m(K_S)$ is a natural locally compact group in which one can realize $\mathbf{GL}_m(\mathbb{Z}[p_1^{-1},\ldots,p_n^{-1}])$ as a discrete subgroup. Why one would care about this, I am also not sure. I imagine it has something to do with studying functions on the quotient and things such as Tamagawa numbers. Perhaps some representation theory is involved.

REPLY [11 votes]: Supplementing other comments and @JimHumphreys' answer: Thinking of automorphic forms as living only on quotients of symmetric spaces or of real Lie groups leaves one with an extremely awkward neo-classical version of Hecke operators, and, more pointedly, no action in sight of the corresponding $p$-adic groups, so no way to take advantage of what is known about their representation theory. To "convert" automorphic forms as functions on something like $G(\mathbb Z)\backslash G(\mathbb R)$ to automorphic forms on $G(\mathbb Z[1/p])\backslash G(\mathbb R)\times G(\mathbb Q_p)$, not only makes the $p$-Hecke operators much more tractable, but, in fact, happily, allows the direct application of the representation theory of $G(\mathbb Q_p)$.
(One main virtue of the latter is the wonderful Borel-Casselman-Matsumoto theorem, that shows that not only spherical representations, but admissible repns with Iwahori-fixed vectors, are subrepresentations (and quotients) of unramified principal series. This also does account for the "square-free level" condition of many classical papers on modular forms, since these exactly correspond to Iwahori-fixed vectors...)
For that matter, the physical space $G(\mathbb Z[1/p])\backslash G(\mathbb R)\times G(\mathbb Q_p)$ arises very reasonably, as a sort of non-abelian solenoid, namely, the (projective) limit of $\Gamma(p^n)\backslash G(\mathbb R)$, as $\Gamma(p^n)$ runs over principal $p$-power congruence subgroups. One would find that the limitands in this limit arise inevitably in looking at $p$-power Hecke operators even at level one.