Ofcourse he was behind bars if he was produced in the court, he is not like some kid of saint, that he will willing come to court or to police a day before his hearing..
He is not a saint but he was under the custody of "agencies" and not police.
Jihadi figures who are under trial are rarely handled by police. They are usualy given "house arrest" or under "protective custody" of agencies.
It is very possible that "Dr. Usman" was let go by brainwashed agency elements. That is why these guys get close to sensitive installations - without insider input such things cannot happen.