Much of On the Road contains anti-police sentiments. Since we as readers are sympathetic to the criminals, we take a side against the law enforcement, and the police are explicitly insulted for being power-hungry and abusive. As for criminality, it is tied both to poverty and to madness. Sal uses Dean’s time in jail to explain his sexual depravity.
Sal’s stint as a night watchman illustrates the finer points of his relationship with Dean. While Dean is a criminal through and through, Sal tries and fails to be on the other side of the law. He is unable to be an effective watchman, but his attempt nevertheless, can be traced through much of his later interactions with Dean.