Maybe Mhw has seen too many thrillers set in fascist or communist states, where police officials go through trains demanding to see the papers of all the passengers. Or maybe he imagines that police would ask to see travelers' identity papers at the borders between the various counties and states. That didn't happen in 1860s America.
Remember that American society was not nearly as automated and mechanized as today, and only a minority of healthy men could be spared from ordinary jobs to serve in the army, and many of them would sometimes be traveling for work reasons, looking for new jobs, or moving west. One of the main advantages of the Union over the CSAConfederacy was its more mechanized agriculture that enabled a lot of farm workers to join the army without lowering food productions.
A lot of men who didn't want to be conscripted headed out west to the frontier. One army officer sent west after the war found his region full of confederate sympathizers, draft dodgers, deserters from the Union army, and other sinister characters.
The US Army had a provost marshal's bureau dealing with military law and order, including tracking down deserters. But that didn't stop a small number of "bounty jumpers" from enlisting for the enlistment bounties paid by the federal, state, and local governments to encourage voluntary enlistment, deserting as soon as they could, and reenlisting in another unit for another bounty, over and over again. Even though the maximum possible penalty for desertion was death, the percentage of deserters caught was small enough that many thousands of soldiers deserted once, and there were even those "bounty jumpers" who deserted over and over again.