Apple music has a tradition of playing a bit around with your music files but this one was severe.
Apple acknowledged that an "extremely small" number of customers were having their libraries disappear without their permission
Extremely small or not; this is bad. It would be nice to make Apple Opensource to investigate what they are really doing to your libraries...That is not going to happen.
More here