Unless I read the news, I don't want to be critical of it. People are too gullible these days. However, from the top of my head, I can already think of some reasons why they were fined.
Have you guys heard of the Ghost Ship warehouse fire of Oakland a couple monthys back?
Churches are zoned with certain requirements. It is not zoned as a residential or hotel/motel living requirements. Forget churches, religion has nothing to do with it. Let's say it is "office space." Same reason. If it is not zoned for people to live in, then you cannot live in it because they do not meet the requirement for living space. To violate that, then you blur the line between each zoning and put people in danger.
That was the case with the Ghost Ship warehouse fire. The warehouse was zoned as a warehouse to store boxes of things. It was never meant to be living quarters. They decided to illegally modify it and rent it to people without passing inspection. A lot of people died.
I'm assuming that it is easier to zone a church, much like office spaces, than it is to zone living quarters. During the dotcom era, some hi-tech companies owned by asshole Asian bosses work their employees to the bone. Some of them brought sleeping bags to the offices. This would technically be illegal and falls under the same issue as the church here.
In Korea they have something called "officetels." They are rooms in a building that can be used both either as an apartment to live in or an office space. It is a type of dual zoning. Perhaps Americans should look into it. It is also notable that "some" churches actually DO have living space zoning. These churches are usually a combination of a house of worship and a homeless shelter.
Know the laws before you knock on something you don't understand.