I am not an expert in RE Law, but from my similar experience:
If your lease is to May 31, then neither you nor they can change it without prior agreement. They cannot force you out earlier, and you cannot leave earlier without paying.
They probably sent you a notice that they would not renew your lease. But you could most likely stay on at the same terms month-to-month until they began to evict you. To avoid this inconvenience to them, their letter told you to leave at the end of the lease.
I once stayed in a house for four months after the bank unexpectedly (to me) took the property from my landlord. Each time I got a strong-arm letter from the bank, I would call to find out what was happening with the property and tell them my search for a new place. One banker said it was good to have someone living there, but they were worried that they would eventually have to evict me. His job was to avoid such complications, not to collect a few months extra rent.
You just might have been able to do the same, if you had found the right person to talk to. When the sale process begins, the real estate agent or whoever is selling the property would want you out of the way. In my case this did not happen very quickly - I was lucky.