You're forgetting the key line that frames the whole scene. When they walk in Kirk says:
Once again, we've saved civilization
as we know it.
And the good news is they're not
going to prosecute.
They might as well have arrested me;
I felt like Lieutenant Saavik.
WE. US. ME. This is all in reference to them. The dialog was smartly re-ordered.