What people dislike I think isnt actaully the act of being a landlord, but the land speculation that most landlords partake in. Clearly providing homes to rent is valuable to society, the problem is that a huge part of the landlording business is waiting for the value of the land to increase, which obviously pisses people off as they see the landlords getting something for nothing. The alternative is land value tax which makes land essentially worthless because the government captures most of its value, destroying the ability to speculate on it.