You'd think that they'd then simply let you go home. That's what uniformly happens on television and in the movies, after all. You walk out of the courtroom.
Apparently, that does indeed sometimes happen. But not always. Occasionally, it seems, they keep you in jail for another day or so. While they're "processing the paperwork".
That's apparently fine, holds the Ninth Circuit. No Section 1983 violation there.