Do you realize that writing the code is maybe ~25% of what a senior software engineer does?
Another example is phone support. AI is already being used there, for example, in some banks (in Russia) you are first greeted by a robot if you call, and only if it cannot answer your question it will let you talk to the human.