When the law is not what it seems

Last year I read a case in my property textbook that has stuck with me.  It illustrates the ways that seemingly generic laws are used to empower the powerful at the expense of the weak.

Suppose Landlord has a piece of property. Tenant A is currently in possession and will be moving out, and Tenant B has signed a lease to takeover the premises. If Tenant A does not move out, who should be responsible for taking the time and trouble to evict Tenant A? The Landlord, or Tenant B who has already signed a lease and has the legal rights to the use of the property?

On its face it is a strait forward question. There are pros and cons on both sides. We simply need to pick a rule and apply it consistently so that the market will know what to expect. For some, as long as the rules are followed, that is justice. Which rule we use is not a question of justice. This is not a particularly moral question.

There is a certain logic to requiring the person who now wants to use the land, and who has the legal right to the land, the lease holder, to get rid of the person who has overstayed their lease. But who is more than likely to know that Tenant A will not be moving out, and is in fact three months behind on their rent. Would Tenant B know anything about this? In fact, it is quite possible that the Landlord might rent the property to Tenant B so he could get paid knowing full well that Tenant A was not going anywhere without a fight. Meanwhile, the Landlord is trying to collect rent from both parties, and has shifted this problem to the unwitting Tenant B who had no idea what was going on prior to him leasing the land.