It's typically not one driving the other. Reducing costs by laying off employees can happen with or without reorganizing in a major way. If you want to get to a more effective organizational structure (arranged around company priorities and strategy, clear authority and responsibility, aligned goals, less hierarchy and unnecessary dependence, etc.), you can do that with or without significant layoffs.
So theoretically what happens in this case is the company's senior leadership decides on strategic priorities and a proposed level of investment. Once that's approved by the board, they look at the organization and specific resource allocation. It's not really that linear, though: changing market conditions and surprising opportunities or threats can lead to changes in how much they'll invest overall, which can have a big impact on the size of the layoffs. Of course the reality is typically a lot messier -- no idea what actually happened in this case.
So theoretically what happens in this case is the company's senior leadership decides on strategic priorities and a proposed level of investment. Once that's approved by the board, they look at the organization and specific resource allocation. It's not really that linear, though: changing market conditions and surprising opportunities or threats can lead to changes in how much they'll invest overall, which can have a big impact on the size of the layoffs. Of course the reality is typically a lot messier -- no idea what actually happened in this case.