I bought a house in SB that had its stand alone one-car garage illegally converted into a bedroom. It had a side door installed, and a wall built about five feet into the garage (leaving the owner about 5 feet of storage space in the garage). The garage floor showed signs of water infiltration. The owner was renting that and the house's three bedrooms out to college students and had stopped paying his mortgage, or caring for the house at all, a few years before. He had also painted the roof black in an effort to make it look in better condition to a possible buyer. A real schmuck of a guy.
The city did not charge me a fine, but I had a certain amount of time to return it to a garage, including removing all the illegal, dangerous and completely convoluted electrical work, then applying for a permit to re-install electrical work correctly (I did want a light bulb inside and outside the stand alone garage), removing that interior wall, moving the door away from the property line (it was about two feet from the backyard property line).
I saved some money on the architectural drawing fees by drawing the iterations of our plan myself, but it took a couple tries before we got it to the city's satisfaction. In all, it cost us between $3 - 4,000 --- for an unheated, cement floor single car garage space!!
We also replaced the roof on the entire house, including on the garage, but that is a different issue. The seller had spliced in ceiling joist "pieces" without any sort of support system or connections between the pieces. The roof, with any pressure applied (think really bad storm), could have collapsed! For a really tiny SB bungalow with a one car separate garage, the roof and its inherent repair work was $15k.
If we had not done this, I am sure there would have been a fine and repeated notices that we were in violation with the city codes. Or, the roof might have collapsed and killed one or some of the inhabitants inside. We cannot live comfortably with this kind of negative energy -- especially when it was caused by someone else.
There are an amazing amount of houses in this condition in SB (and elsewhere, to be honest); aka, many who think themselves above the law, and do not give a hoot about how their irresponsibility affects the lives of their tenants.
Hope this information helps.