YCor gave a brief explanation in the comments. Based on your comment about seeking intuition, I think it would be helpful to explain concretely the backstory to the calculation YCor did:
Given any kind of arithmetically-defined group $\Gamma$, you want to find a real algebraic group / Lie group $G$ in which $\Gamma$ is arithmetic. For this, a necessary condition is that $\Gamma$ is discrete in $G$, but it's not sufficient. If $\Gamma \subset H \subset G$, then $\Gamma$ is not arithmetic in $G$ unless $G/H$ is compact, so we want to take $G$ as small as possible containing $\Gamma$.
Making $\Gamma$ discrete is easy. You just have to express elements of $\Gamma$ by integer coordinates, since $\mathbb Z^n$ is discrete in $\mathbb R^n$, so any subset of $\mathbb Z^n$ is discrete in any subspace of $\mathbb R^n$ containing it.
For example, for $\Gamma = SL(2, \mathcal O)$ or $\Gamma$ any subgroup of $SL(2, \mathcal O)$ (in, for simplicity, the special case $\mathcal O = \mathbb Z[\sqrt{a}]$), we can write any matrix $g$ as $M + N \sqrt{a}$ where $M, N $ are $2 \times 2$ matrices over the integers. This embeds $SL(2,\mathcal O)$ into $\mathbb Z^8$. For an arbitrary group over an arbitrary ring of integers $\mathcal O$ you can do the same thing, you just need to pick a $\mathbb Z$-basis of $\mathcal O$. So $SL_2 (\mathcal O)$ is discrete inside the manifold $\mathbb R^8$ parameterizing pairs $M ,N$ of $2\times 2$ matrices over the reals.
Of course we care about $\Gamma$ as a group and not just an abstract set. So you need to find a polynomial formula for the multiplication map. We have $$ (M_1+ N_1\sqrt{a} ) \cdot (M_2+ N_2\sqrt{a} ) = (M_1 M_2 + a N_1 N_2) + (M_1 N_2 + N_1 M_2) \sqrt{a}$$ so we ca write multiplication as $$(M_1,N_1) \cdot (M_2, N_2) = ( (M_1 M_2 + a N_1 N_2) , (M_1 N_2 + N_1 M_2) ).$$
Then $\Gamma$ is discrete inside the group of pairs of $2\times 2$ real matrices that have inverses under this multiplication map, i.e. those such that $M + N \sqrt{a}$ and $M - N \sqrt{a}$ are both invertible. This is isomorphic to $GL(2,\mathbb R) \times GL(2,\mathbb R)$.
But this is not the minimal group inside which $\Gamma$ is discrete. To find that, we need to take the Zariski closure of $\Gamma$, i.e. for all polynomial relations satisfied by $(M ,N) \in \Gamma$, we look at only those $M, N \in M_2(\mathbb R)$. This defines an algebraic group $G$, which always contains $\Gamma$, and that's the group in which $\Gamma$ is arithmetic.
These include $\det (M + N \sqrt{a})=1$ and $\det (M - N \sqrt{a}) =1$, which cut the group down to $SL(2,\mathbb R) \times SL(2,\mathbb R)$, which if $\Gamma =SL(2,\mathcal O)$ is as far as we go, but for $\Gamma$ the unitary group, there is another polynomial relation:
$$ \tau( g^T) Ag = A$$
i.e.
$$ ( M^T- N^T \sqrt{a}) A ( M+ N \sqrt{a} ) = A $$
and
$$ ( M^T+ N^T \sqrt{a}) A ( M- N \sqrt{a} ) = A $$
These two relations cut you down to a smaller group. Whatever it is, it's clearly not $SL (2,\mathbb R) \times SL(2, \mathbb R)$, because these relations are not satisfied for every element in $SL(2, \mathbb R)$. In fact, it's $SL(2,\mathbb R)$, for the reason YCor gave: Essentially, either $M+N \sqrt{a}$ or $M- N \sqrt{a}$ is determined by the other one, so you only need one $2\times 2$ matrix to determine the element.
In summary, you always want to express your group with coordinates over the integers, and relations defined by polynomials (ideally over the integers, or else remember to write down all Galois conjugates of your polynomial relations). Then you consider the real solutions of the same set of polynomial equations, and that will give you the right algebraic group. Before tricky relations that involve the Galois group like the one appearing in the definition of the unitary group, this will split as a product over the real places of your number field, but these extra relations will relate the projections to different places, giving a smaller group.