Do you not see how your argument could be applied to steam engines putting human laborers out of work? Or computers putting (human) calculators out of work? Do you think inventing the steam machine or computers was a mistake too?
These API composers perform a task many humans want to do. And there are roughly zero consumers of music saying "you know what's missing from the music market? music made with no human input."
This strictly serves capital. The goal is to destroy more artists livelihood to marginally increase the wealth of already wealthy people.