Section 1940.2 is aimed at a specific thing: not eviction, but the pressure applied instead of eviction. Subdivision (a) makes five kinds of conduct unlawful when done "for the purpose of influencing a tenant to vacate a dwelling". Two are defined by cross-reference to the Penal Code — conduct violating § 484 (theft) and § 518 (extortion). The third is the use or threat of force, willful threats or menacing conduct amounting to a course of conduct that interferes with quiet enjoyment in violation of § 1927 and would create apprehension of harm in a reasonable person. The fourth is a significant and intentional violation of the entry rules in § 1954. The fifth is a threat to disclose information about the immigration or citizenship status of the tenant, an occupant, or someone the landlord knows is associated with them.
The drafting matters in two places. Paragraphs (3) and (5) say expressly that the tenant does not have to be actually or constructively evicted to obtain relief, so the claim does not depend on having actually moved out. And subdivision (b) attaches a civil penalty of up to $2,000 for each violation to a tenant who prevails, including in small claims court — which is why this section turns up in disputes where the sums otherwise look too small to litigate.
Subdivision (c) is the limit. A warning notice given in good faith about conduct that violates or may violate the lease or the law is not a violation, and neither is explaining the lease, the rules or the law in the normal course of business. Subdivision (d) adds that the section neither enlarges nor reduces the landlord's right to terminate a tenancy under other law. So a landlord who serves proper notices and goes to court is not caught by this section; a landlord who removes the front door, cuts the power or mentions immigration authorities may be. Whether particular conduct crosses that line, and what it is worth, is a question of evidence to take to a lawyer or a tenant service.