MOBILE, Ala. — Crystal Thompson was at home watching the Rose Bowl parade when a county sheriff came to arrest her for shoplifting from the local Walmart.

Ms. Thompson, 43, was baffled and scared. An agoraphobic, she had not shopped at a Walmart in more than a year. She was taken to a Mobile jail, searched, held in a small room and required to remove her false teeth, something she didn’t even do in front of her husband.

Four days after she returned home, the letters from Walmart’s lawyer started to arrive. The lawyer demanded that Ms. Thompson pay the company $200 or face a possible lawsuit. She received three letters over two months in early 2016.

Shoplifting is an intractable problem for retailers, costing stores more than $17 billion a year, according to an industry estimate. To get the money back, many companies employ aggressive legal tactics and take advantage of loosely written state laws, pushing for restitution even when people have not been convicted of wrongdoing.