Neural nets are doing exactly the same from digital data usually using random noise as an extrapolation seed.
But the reason we ask ourselves if AI genereted X in masse is legal or not is not about how things work, but what their impact is to living human beings. Laws are about protecting humans.
I guess what will decide in the end is if people get more music they like than before assistive "AI"s. Actually, we don't know if composers + "AI"s can produce an additional significant amount of music people like.