Apple has cut dozens of roles over the past few weeks, including some employees who have been with the company for decades.