WHAT DEMOGRAPHIC COLLAPSE LOOKS LIKE: Japan’s lonely seniors are shoplifting in search of the community and stability of jail.

“My husband died last year,” one inmate says. “We didn’t have any children, so I was all alone. I went to a supermarket to buy vegetables, and I saw a package of beef. I wanted it, but I thought it would be a financial burden. So I took it.”

Neither the government nor the private sector has established an effective rehabilitation program for seniors, and the costs to keep them in prison are rising fast. Expenses associated with elder care helped push annual medical costs at correctional facilities past 6 billion yen (more than $50 million) in 2015, an 80 percent increase from a decade before. Specialized workers have been hired to help older inmates with bathing and toileting during the day, but at night these tasks are handled by guards.

At some facilities, being a correctional officer has come to resemble being a nursing-home attendant. Satomi Kezuka, a veteran officer at Tochigi Women’s Prison, about 60 miles north of Tokyo, says her duties now include dealing with incontinence. . . .

“I was imprisoned for the first time when I was 70. When I shoplifted, I had money in my wallet. Then I thought about my life. I didn’t want to go home, and I had nowhere else to go. Asking for help in prison was the only way.”

Sad.