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 \geq 0$ 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(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.