There's actually a lot of cross-pollination going in between the 2 platforms. For some things it's easier to release first on the desktop at WWDC and let the devs play with it a year or 2 before it ends up on iOS. Look at the new Force Touch thing they're rolling out. Apple Watch -> MacBook -> iPhones/iPads last.
Then you have things like Continuity in Yosemite that tightly binds a Mac and iPhone, that increases sales of both and prevents commoditization.
Besides, in a few years phones will be at the "good enough" phase like desktops are and people won't be upgrading every 2 years, so the current huge growth of mobiles can't be their only source of income when they start slowing down.