It has helped gain sympathy with some folks to avoid jail or get less of it.
Less so now than in the past, and generally only when the charges are on the minor side rather than the serious side. Scenario: A pregnant woman gets picked up on, say, her third shoplifting (petty theft) offense. At least in CA, that would probably be charged as a felony because of the two priors, assuming the convictions were misdemeanors, but it's a low-grade felony. She would be looking at jail time for sure, but probably not prison time (although she could be, depending on a number of things). If she was nearing delivery around sentencing time, most likely a judge would either give her an extended probation (pay a fine, restitution, obey all laws, etc.) and suspend the jail sentence if she's real lucky, or he would allow her to report to the jail to serve her sentence in, say, six months, or give her weekends in jail or some kind of work project service. But it's unlikely the judge would reduce the charge to a misdemeanor. In other words, she might catch a break of sorts on the sentencing and how she serves it, but not the charging.