These layoffs would have occurred anyway irrespective of AI. There were too many people employed to write software of which most could never write original software.
For example you need to be really smart to be a meteorologist but there is only a limited need for that. If industry over hired meteorologists by 10x actual demand eventually some of those people will find themselves unemployed.
As another example there are some terrible teachers in the world. So people go into education because they love teaching but some people go into teaching only because they know they can achieve employment. People knew they could make really good money claiming to be a software developer and that they could easily find employment, not because they enjoy writing software.
Eventually software, as a profession, will be hollowed out because the profession is expensive for the employer. What will be left are two possibilities: people that actually enjoy writing software to produce a crafted product or people that are like mechanics who can expedite business processes like project managers or assembly line workers. This is way overdue. AI is just the excuse to release people from employment.