Shoplifting has become something of a lifeline for Japan’s elderly population.

As Bloomberg reports, nearly one in five women in prison is 65 or older. These elderly women commit minor crimes in order to escape poverty and solitude. Often, women are repeat offenders so that they can return to prison once they are released. To serve this group, the government is constructing prison wards specifically for elderly inmates and increasing nursing staff.

A 78-year-old inmate referred to as Ms. O has stolen energy drinks, coffee, tea, a rice ball, and a mango. She told Bloomberg: “Prison is an oasis for me—a place for relaxation and comfort. I don’t have freedom here, but I have nothing to worry about, either. There are many people to talk to. They provide us with nutritious meals three times a day.”

The country has undergone a demographic shift so extreme that more than a quarter of its population are senior citizens. This is reflected as well in the overall prison population where nearly 20% are seniors.

Yet a disproportionate number of elderly women (25%) are expected to live below the poverty line compared to men (10%). Unmarried women won’t receive enough of a pension to prevent them from living in poverty.

It’s not likely the government wants to encourage prison as a solution for elder care. But there is a shortfall between the projected elderly population and the number of caregivers needed to serve them. It’ll use robots to add to the ranks of companions, which Quartz has reported is also happening in China.