I have a theory that the Sha didn't exist as monsters at first - initially, the essence of Y'Shaarj was like a plague or curse, defiling the earth. Then the emperor Shaohao conducted his rituals, turning the essence of Y'Shaarj from an intangible force into the Sha. While this meant that the Sha could attack directly, it also meant that Shaohao and his allies could fight and defeat them, imprisoning them. This kept Pandaria largely free from the influence of Y'Shaarj's last breath - Shaohao essentially turned the breath of Y'Shaarj into something you could beat up and lock away.