it's not an artificial cost - i know one couple who have signed year long leases and been moved on in under 4 months - four houses in a row. Family moved back, landlord wanted to do repairs on their own house, sold the house etc. it costs them $400 - $500 in letting fees, plus moving fees plus time off work etc etc - every single time. I think landlords also should be called to responsibility if they waste peoples time. The tenants weren't at fault but they pay the price.
If they signed fixed term contract then the landlord cannot break it even when he's selling the house. They would have to agree to early termination.
So if the property being sold is rented for a fixed-term, the property must be sold with the tenancy and tenants in place. The buyer will then become the new landlord for the rest of the fixed-term. The landlord may be able to sell the property empty if the tenant agrees, in writing, to end the fixed-term early.