Since unused space is wasted space iOS will cache near everything. When iOS knows certain data is no longer needed OR when space becomes a commodity it will let go of it.
Easy example is syncing with iTunes, a lot of diagnostic data and various other things are copied and sent to Apple (if opted in).
Pre sync
Post sync
Restarting the iOS device could clear some other stuff.
Regardless it will generally come back with time. sometimes not much time either....less than a day. This is only an actual problem when you NEED space and its not their because of system storage usage, which in my experience has never been the case.
Just keep in mind the amount of stuff that needs to be kept track of on the phone. I'm not sure if the data is contained here but spotlight search comes to mind. You can type something into the search field and it will scour through messages, emails, contacts, apps, etc etc to find what you are looking for in seconds generally sub 1 second.
Apple could do a better job breaking down "system" however my advice would be to ignore it if its not a problem. You aren't doing yourself a favor keeping 120 gb free on a 128gb phone...use all the space you paid for!