They hire security personnel, but people figure out that a) even when security catches you, they are not allowed to restrain you and b) the police do not respond to shoplifters (in certain jurisdictions they are not allowed to.
The stores are responsible for the cost of missing inventory - they credit it back to the manufacturers. Stores already run tight margins, so this cost ends up getting paid by reduced headcount at stores (except for security, if it's bad enough) and directly in prices.
And this is in the grocery space, where there's very little secondary market for the stolen goods!