Before the industrial revolution, shoemakers would make shoes. It was a specialized skill, meaning shoes were very expensive, so most people couldn't afford them.
Then factories were invented. Now shoes could be made cheaply and quickly, by machines, so more people could afford them. This meant that far more people could be employed in the shoe industry.
But those people were no longer shoemakers. Shoemakers were wiped out overnight.
Think of how huge the shoe industry is now. There are jobs ranging from factory worker to marketing manager. But there are zero shoemakers.
AI writing software doesn't mean it's the end of the industry. Humanity will benefit greatly, just like we did from getting cheaper shoes.
But the software engineers are screwed.