For the second time in as many weeks, Philadelphia police on Monday found body parts — and bodies — in unlicensed funeral homes. 

How does that happen? 

It turns out that an obscure lawsuit over the regulation of funeral homes and a tough economic environment for funeral homes —  at least in part —  paved the way.

READ: Director of West Philly funeral home hit with three charges of abuse of corpse

Back in 2012, a federal judge in Harrisburg declared that the state could not enforce many of the rules funeral homes followed.  

"I've read the regulations in all 50 states," said Tanya Marsh, who teaches the nation's only law school class on funeral law at Wake Forest University School of Law, according to the university. "Pennsylvania is among the most restrictive." 

A group of funeral home owners who had sued Pennsylvania, arguing that it's laws were antiquated and served, for the most part to protect existing funeral home owners from outside competition. 

For the next two years, Pennsylvania could not inspect funeral homes without a search warrant, until October 2014, when a federal appeals court overturned that ruling. 

The result: while regulators in Pennsylvania strive to inspect funeral homes every two years, they are still working through a small backlog stemming from the court decision.

6ABC reported that police were called to the Powell Funeral Home in the city's Strawberry Mansion section after neighbors described a stench. Officers found three bodies in a garage. Another funeral home, the station reported, offered to handle them, until it was discovered that it too had been operating without a license.

By Monday, the agency that regulates funeral homes had stepped up inspections in Philadelphia, leading them to The Hawkins Funeral Home on 5300 block of Vine Street. Investigators said they found the funeral was unlicensed and lacked refrigeration. 

"Our investigators called the police," said Wanda Murren, a spokeswoman for the Pennsylvania Department of State. 

Related: A prom with a little help from friends, and strangers. 

In both cases where police found bodies, the owners of the homes had licenses to be funeral directors —  but the facility was not licensed, Murren said. 

Marsh, the law professor, said funeral home horror stories happen on a pretty regular basis, but they tend to be local news. 

Why does it happen? Marsh says mental illness may play a role, but economic factors do too.

"Without saying this is a specific cause in these cases, this is an industry that is financially challenged," Marsh said. 

Related: Someone keeps stealing cabs in Philly

Funerals can cost $8,000 each, a price that may not include burial. On one hand, directors are pinched by fixed costs —  mortgages and employees —  on the other are consumers on tight budgets for whom the cost of a funeral represents many months of pay.  

That squeeze has led to an increase in cremations, which may cost as little as $500.  

This year may be the first that more people choose cremation over burial. That too puts pressure on funeral homes, because their fixed costs go away. Marsh said she has talked to funeral home directors who say they've had to raise prices because they have fewer customers coming in the door. 

In that situation, "they are either going to cut corners or pass the cost on consumers."