For non-rent control places new landlords subsidize the cost. It's happening a lot in Toronto right now. Tons of new condos that investors bought where the rent doesn't cover the monthly carrying costs. They are betting that price appreciation will make them whole (and more). That's a risky bet.
For rent controlled apartments, you basically pay based on what the tenant's rent is. So if you have someone paying 50% of market rate, that dramatically bring the value of the house down. I was renting in a 3 unit building that would be worth $6M empty, but with 3 tenants paying below-market rates, it was sold for about $2M.
It mostly doesn’t from what I saw in SF (for single family homes anyway). One issue: Prop 13 means it’s hard to compete as a new purchaser vs. someone that purchased many years ago. For instance, my neighbor rented her ground floor out. Because she had lived there for 40+ years her property taxes were ~$1000/year. Recently sold houses in that area had property taxes of 15-20 times that amount.