The film doesn't give us an answer, but the book does. Chigurh (as explained to Carson Wells in the novel) allowed himself to be arrested (he was pulled over after he left the scene) for killing a man in a parking lot after the man said something Chigurh didn't like. He (Chigurh) wanted to see if he could "will" his way out of the situation. Although the book and the movie screenplay differ in many ways, both are excellent. Unless there is a directors cut of the film, the reason for Chigurhs arrest is only available in the novel.
I don't know that I necessarily disagree with the other answer posted but I've read the book and seen the film and I don't think that an "explanation" can be copied so easily from one to the other. I found the difference in the way they treat the character of Chigurh is so great that the two stories are practically independent.
In the film, Chigurh is presented less as a character and more as a force of nature. He isn't a violent person, he is violence. He's not trying to prove anything to anyone, least of all himself, he just is. That otherworldly or mythical characterization is largely at odds with the book, in which Chigurh is represented as a thinking and morally capable character, albeit a psychopath.
It's pretty clear that the Coen Bros cut out the more human parts of Chigurh's character to emphasize/create a more elementally nightmarish creature. As such, I think that not only was the reason for the initial arrest not shown but it couldn't have been shown because having a reason--even a psychopathic reason like the one in the book--would undermine the terrifyingly arbitrary nature of Chigurh's character.
That's how I understand it. Perhaps if I reread the book and rewatched the film I would embrace the conventional wisdom. And perhaps not.
It ties into Chigurh's ultimate flaw as the "ultimate badass", he is arrogant. He only puts himself directly into situations, in which he firmly believes he has control over.
Note that in every scene, he quite literally dominates the pace, tone and direction of the conversation. This is also true in his actions, whom does he terrorize? A young naive sheriff (whose back is turned), an old gas station attendant, two simpletons, and his competitor. But only twice is Chigurh shown to be surprised by the outcome: his near death experiences. This occurs twice in the film, first with the hotel shootout and second with his car crash. It's interesting to observe that we also are granted a glimpse at his process. After his near death experiences, we can see Chigurh attend to himself medically. I believe that this is him reflecting on his mistakes; however, it is his final experience that ultimately breaks him (literally) as character. He soon learns that he could never prepare himself against the random chaos of fate, and that literally, anything could happen.
It's also interesting, when he bandages himself up, it is usually through rudimentary and often primitive methods.
The keys to understanding the characters in any of the Cormac McCarthy novels is to look to a literary movement called "naturalism". McCarthy, Elmore Leonard and Jack London relied heavily on the science of evolution and for the most part, rejected spiritual understandings of behavior. They did not believe in free will but believed in predeterminism. You couldn't overcome your genetics and your environment in combination. Some of the comments by Sheriff Bell complaining of how things are changing for the worst show the power of nature introducing more perfect predators such as Anton Chigurh. The recent series "Klondike", had a deep vein of naturalism and forces of nature that mold men and women to behave consistently with their genetic loading. I have read all of the novel's of Cormac McCarthy, Elmore Leonard (please watch justified) and many of the other proponents of this movement. "Blood Meridian" which featured the "judge" and " all the pretty horses" give further insight into the characters and their interaction with the natural environment. I can also promise you, less than a fulfilling ending to the stories.
Remember Sheriff Bell visited the old guy in the end? Elvis or something? He was in a wheelchair. Bell asked if the man who shot him died in prison. I believe this part explains why Chigurh was in cuffs. Maybe he shot him. He then mentioned something about being released. So, my guess is as good as anyone's.