It is not true that MCMC fulfilling detailed balance always yield the stationary distribution. You also need the process to be ergodic. Let's see why:
Consider $x$ to be a state of the set all possible states, and identify it by the index $i$. In a markov process, a distribution $p_t(i)$ evolves according to
$$p_t(i) = \sum_{j} \Omega_{j \rightarrow i} p_{t-1}(j)$$
where $\Omega_{j \rightarrow i}$ is the matrix denoting the transition probabilities (your $q(x|y)$).
So, we have that
$$p_t(i) = \sum_{j} (\Omega_{j \rightarrow i})^t p_{0}(j)$$
The fact that $\Omega_{j \rightarrow i}$ is a transition probability implies that its eigenvalues must belong to the interval [0,1].
In order to ensure that any initial distribution $p_{0}(j)$ converges to the asymptotic one, you have to ensure that
- 1 There is only one eigenvalue of $\Omega$ with value 1 and it has a unique non-zero eigenvector.
To ensure that $\pi$ is the asymptotic distribution, you need to ensure that
- 2 The eigenvector associated with eigenvalue 1 is $\pi$.
Ergodicity implies 1., detailed balance implies 2., and that is why both form a necessary and sufficient condition of asymptotic convergence.
Why detailed balance implies 2:
Starting from
$$p(i)\Omega_{ij} = \Omega_{ji} p(j)$$
and summing over $j$ in both sides, we obtain
$$p(i) = \sum_{j}\Omega_{ji} p(j)$$
because $\sum_{j} \Omega_{ij} = 1$, since you always transit to somewhere.
The above equation is the definition of eigenvalue 1, (easier to see if you write it in vector form:)
$$ 1.v = \Omega\cdot v$$