Because the wrong people got into positions of power within the company, and as a result the primary driver moved from making great games to making money. This is why BA bought King - so they could leverage existing success by pushing their existing franchises into mobile.
As to why mobile is the money maker, it has to do with the developing markets such as China, India, and other huge population centers where everyone has a smart phone, but few have a gaming PC. It's really sad. Just because there is a huge market in mobile, does not mean Blizz needed to go there. They could have remained king of the hill in high quality PC gaming.