First of all we live in buildings and second of all, we cannot afford to clean most public or shared or business spaces ourselves.
These jobs may be automated too one day, they are certainly partially automated now, but the necessity of the job is obvious.
Notaries and most software dev is completely work-for-work's sake and should not have ever existed.
It is a testament to this fact how streamlined bookkeeping is and always has been on the free market (and even then a large part of private bookkeeping is due to the need to comply with government taxes and regulations; in eg. criminal enterprise, bookkeeping is even more streamlined).
However, software devs have made such a mess of it all, that not even the free market was able to streamline it, creating millions of low-utility software bookkeeper jobs (that are finally starting to go away).