Toward the end of last year, Peter Goldberg, who gave up a remunerative career providing legal counsel to hedge-fund and private-equity firms, received a call that put him in Brooklyn Criminal Court at midnight to help a 16-year-old boy charged with petty larceny. The boy had been accused of stealing a pair of sneakers belonging to the teenage son of his foster mother, an act of retaliation, apparently, for the theft of a Game Boy.

Because he had been arrested twice before — once on a charge of jumping a turnstile and another time on a suspicion of possessing marijuana — and had missed certain court dates associated with those arrests because, like most teenage boys, he failed to maintain an unerring Google calendar — the bail set for him that night was $500. Given his circumstance, this was a daunting sum.

Mr. Goldberg had arrived in his capacity as the executive director of the Brooklyn Community Bail Fund, one of several charities created in recent years in cities around the country to pay bail for those who would otherwise end up in jail for low-level offenses, unable to come up with the money themselves. In New York, close to three-quarters of pretrial detainees in the city’s jail system, many exposed pointlessly to the horrors of Rikers Island, are there because they could not afford the price of release at the time of arraignment. Of those, less than 8 percent have been accused of doing anything gravely perilous to the common good — killing someone, committing sexual offenses or carrying a gun.

The cruel absurdity of making freedom contingent on material well-being in a society where, as the Federal Reserve reported last year, only 46 percent of Americans surveyed said they had enough money to cover a $400 emergency expense, has made bail reform a popular cause and the elimination of cash bail a goal of many in the criminal justice reform movement. In April, a federal judge in Houston overturned Harris County’s bail system, arguing that the practice of detaining poor, misdemeanor defendants essentially for the crime of not knowing someone with an extra $1,000, violated equal-protection rights against discrimination based on wealth. The California Senate recently approved a bill that would work to ensure that no one is kept in local jails as a consequence of poverty.