I know that people are puzzling over this. My understanding is that white collar crime is treated differently from blue collar crime. Once a white collar crime has been uncovered the culprit is typcially no longer a threat to society and is, therefore, able to secure bail quite easily. Moreover, I believe Madoff was allowed out on bail in exchange for his cooperation in the investigation. Since this was a crime of great complexity, it is important to secure Madoff's cooperation in understanding exactly how he defrauded his clients so that appropriate new regulations can be put into place. There are generally no such compulsions when you're dealing with petty (blue collar) crime. Here's a news item that explains this in more detail.