Sorry, but that happens all the time.
A witness means nothing. Do you have something in writing from the lender saying that a foreclosure would be delayed?
As a practical matter, two different branches of the lender handle loan modifications and foreclosures. The two often run parallel. That is, while the people there are working on the loan modification, other people in another department are working equally hard on a foreclosure. Whichever gets to the finish line first "wins." In this case, the foreclosure people got there before the loan modification people.
Is it legal? Probably. Depends in part on whether the process was under HAFA or HAMP--government programs designed to assist homeowners.
You can contact your state attorney general's office and try to get them involved.
Hope that helps.