Oftentimes you want to put attributes into a logger (file names, ids, etc.) only for a specific scope (e.g. a function or an if-clause).
Creating a scoped-context will allow this, by returning an RAII-object that will remove the inserted keys upon destruction.