One suggestion could be to have a government program that pays for times like these, so it does not come out of the company. Similar to maternity leave in many European countries. But, I am sure no one is going to go for another government program right now. I do hope she could be eligible for unemployment though.
I agree with @plethora the company could have gotten a temp if they liked her work. I’m thinking they had had enough of her, and just let her go.
I don’t think we can make it the employers responsibility to have to deal with an employees difficult circumstances. Sure they can be accommodating as long as it does not effect business greatly. I actually am very put off by how rigid some employers are. I thinker should be open to variable work schedules, working from home, and other ideas to create flexibility in the work place. But, business is business.
We might all look at the employer and think they should have more empathy, but I also look at the employee and think, I hope you have been saving for a rainy day. If she makes very little money it might be hard to save, I have sympathy for that. A person who is very young would not have worked long enough to save up for a break in employment. But, a middle class 40 year old should have a little stash of cash to carry them through a few months of unemployment.