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.
You state the property management sent you a notice to vacate and now they want you to pay the last month's rent? Did the notice have a "vacate by" date? This sounds like a strong arm tactic. I can't tell from your post on how many months of rent the property management company wants. Either way, it would seem to me that if they sent a "termination of lease" notice the legal contract ends there.
If you have a deposit with them, they will probably try to keep it. My understanding is the lease still holds true for a short sale and simply transfers to the new owner. That is not necessarily true if the home goes to actual foreclosure.
Here are a couple of sites that might be able to offer advice: