If the government’s statements and rules/regulations are to have any internal consistency the building should be condemned until brought up to code, and the tenant evicted for their safety.
The building was up to code. That was not the problem.
The problem is that it was permitted as an ADU, and sons of the work was not permitted, because the owner landlord was too cheap to get the proper permitting. The cure was for him to get the proper permitting, which the article makes clear he had yet to do.