Most leases have clauses stating something to the effect that tenants are responsible for keeping their units reasonably clean and sanitary. If tenants start complaining about roaches, a good landlord will do a bit of investigation and remind tenants of the importance of cleanliness, proper disposal of trash, etc.
At least in Oakland, it's the landlord's responsibility to manage pest control. It needs to be done at a building level, or else the roaches will just get shuffled around.
Yeah a good landlord will do pest control but cockroaches are...cockroaches. If you do pest control but have tenants who are leaving food waste out, not disposing of trash properly, etc. it will be a game of whack-a-mole.
As far as communities are concerned, the best places to live are the places where landlords/management and residents/tenants both do their parts to keep things clean and habitable. Teamwork makes the dream work.