The problem is that people say the latter as if it's a solution on its own without also doing the former.
To my knowledge absolutely no one saying "Ban landlords" is also saying "Don't build any more housing." But there are plenty of people who think that you can build housing, in an environment where rich landowners have the ability to buy up and hoard everything you build, and don't comprehend that this in no way solves the problem.