My neighbour is an unintentional landlord. He is on secondment from another part of the UK. Originally 12 months, now likely to be 3 years.
His situation is simple. He has let his house at a rate that covers his mortgage, and costs, while he rents a temporary home here. He isn't making a profit from the property he rents out, it simply covers its costs. If that ceases to be the case, he has no choice but to raise the rent or sell, because he doesn't have any spare income to magically cover an increased mortgage.
Being unable to raise the rent would mean he sells, evicting the tenant in the process. He would then buy here for himself and his family.
The only loser is the tenant who would be homeless. The "landlords are all evil profiteers" theory is hopelessly inaccurate.