The bubbles stick together because of surface tension. The water surface area is smaller when the bubbles are together than when they are isolated. They stick to the sides of the cup for the same reason : part of the bubble is next to the wall of the cup, and this reduces the water surface area.
The bubbles move towards the centre when you stir the tea because the cup acts like a centrifuge. The rotating tea has a higher pressure on the outside and lower pressure on the inside. Bubbles "float" toward the low pressure region at the centre. The pressure difference is not strong enough to draw bubbles away from the side of the cup.
When the tea is rotating, as the bubbles gather together the radius of the raft of bubbles decreases and its angular velocity increases because angular momentum is conserved. However, provided the raft of bubbles is not too large, the forces between the bubbles are not strong enough to provide the centripetal force needed to keep them rotating at this speed and radius at the centre. The raft of bubbles breaks up, and groups of them are flung outward. The reverse process then happens. As the bubbles move apart to a greater radius their angular velocity decreases. Further from the centre the pressure difference in the centrifuge pushes them back towards the centre of the cup, and the raft comes back together again.