Not entirely sure about the back story of Chris Lattner joining Tesla. But according to Techcrunch,
Gross first found his way to Apple after Cue, formally called Greplin,
was acquired by the company for $40 million back in 2013 for its
predictive search capabilities. After spending the last three years in
Cupertino, Gross was ready to get back to his entrepreneurial roots.
It's possible that agreement during that acquisition Gross has a 3 year vesting period and it's not very surprising that some founders leave after certain stock vesting events. This is purely my speculation but it's possible. And the timing of it might just be a coincidence.