Just wanted to point out that iTunes has had a local focused set up since inception, using xml format for a library’s database.
That seems to still exist with the introduction of Apple Music. So all library data (play counts, skips, file locations etc) are stored locally, but streaming files are hosted remotely.
Although whether this was by accident or design I have no idea.