Consider two systems adiabatically insulated from surrounding and are connected through eachother with a conducting wall and are at thermal equilibrium with temperature as $T_0$.
According to first law of thermodynamics
$$dU=\sum_i F_i dx_i$$
Where $U$ is internal energy, $F_i$ are generalized force and $x_i$ are generalized displacement.
Since the two systems are insulated their combined energy cannot increase and since the temperature is $T_0$ which can be considered as generalized force with entropy as generalized displacement. If the temperature $T$ remains constant the entropy $S$ can't increase as $dU=0=Tds$.
Now coming to your question the thermodynamics or statistics in general deals with process over a large time average or through ensemble average, sure in small time limit there can be such processes where one system A gains energy and other system B loses (uncertainty). But at large times the overall effect must be zero.
Analogue of it is two frictionless (Analogue of adiabatically insulated) coupled harmonic oscillator sure they will oscillate (at some instances one oscillator will have more kinetic energy) but their means (energy etc.) will remain constant.