Subletting rental property means you are abusing your landlord's assets, almost certainly violates the terms of your lease and probably violates their insurance policies. Eviction is an appropriate and proportionate response.
The City of San Francisco is using this law to threaten people who do this with the explicit permission of their landlords. Or who own their own place.