takes on risk - if the unit doesn't rent, they still need to pay taxes and whatnot
repairs and renovates units
maintains the grounds and whatnot
Some landlords are scum bags (maybe most), but I remember one fantastic landlord. They came on time when they needed to do service to the unit, were very responsive to issues we had, and didn't screw us on the security deposit. If the handful I've had, only one was truly awful.
Finding a worthwhile investment (i.e. a property that can rent) is a skill and involves work. Managing that investment can also be a job (finding tenants and whatnot).
Very few landlords just sit back, collect checks, and do the South Park cable company nipples thing. Landlords don't make nearly as much money as people seem to think they do. I've looked into it as an investment, and honestly, it's pretty hard to beat lazier forms of investing, like broad market stock funds.