Bake in the fact that many rented houses today were either purchased or refinanced with the historic-low interest rates of ~2021, and there is really just a time difference between someone with pre-existing capital to invest years ago that you didn't have.
That said the cash flow gets better over time as rents increase.
So, you have the landlord having mortgage costs, maintenance costs, insurance costs, and still wanting a profit. And you have the homeowner, having mortgage costs, maintenance costs, insurance costs, but getting to keep what would have been the landlord's profit.
So the GP still has a valid point.
1. Many small landlords are not very financially sophisticated and won't factor in all costs when setting rent prices. For example, maintenance costs are often treated as one-time events ("the water heater broke") and not something to build into the cost of owning the home. I have relatives like this, and they generally view the appreciation on the property as their profit.
2. It's not uncommon for "landlords" to be renting out part of the house they're still living in. In these cases the rent can be somewhat arbitrarily related to the cost of the mortgage.
3. More sophisticated landlords often still have to compete with rents set by (1) and (2). At least in some markets.