For homeless people living in the middle of a city, there's a higher density of essential services. In her case, that would be things like the microwaves or the bathrooms that she absolutely needs without an even greater inconvenience to her lifestyle. These are unreliable. They can fail from overuse or they can get taken away or locked behind paywalls because store owners don't like the fact that they attract homeless people. In a city, the density of these services makes it so that she probably knows where the next nearest one is if one of them is unavailable. It's risky, sure, but to her, it's a known risk she's adapted to live with.
She could move to somewhere cheaper, but "somewhere cheaper" is inevitably somewhere with either a lower density of people and money (and therefore fewer microwaves/bathrooms/whatever else she needs... I'm just going to refer to these as microwaves/bathrooms from here on), has less opportunity for work (not as much of a factor in her case, as you pointed out), or has some social/political aspect that makes it undesirable (like a higher rate of crime, which translates into less money or a much lower quality of life). Plus, you have to factor in the immediate cost of buying the microwaves or affording the apartment with a bathroom which she was avoiding previously. She could try and save or otherwise micromanage her money to cover the cost somehow, but when you're living paycheck to paycheck (as is usually the case), this means a few months, or even years of a worse quality of life for a life that isn't necessarily or apparently much better in the long run.
Then you have to consider intangibles like the support network, the knowledge of the area, or the environment. All of these can have a positive effect on a person's mental state, and if it's not the reason for staying in the area itself, giving it up for the unknown can easily be a reason not to leave.
The cost vs benefit is a total mystery and varies per person, and it's even harder to figure out when you're dealing with stress from your living condition.