Matching impedance of the load after inverting
I you need rail-to-rail output, you should use a class D output (replace R1 by a PNP - this may need adaptation when you attack the base to avoid excessive current - or better replace both bipolar by an NMOS and a PMOS).