“We weren’t raised like that,” a kindhearted NYPD lieutenant explained Friday, when asked why he and two fellow bike cops did not arrest a hungry shoplifter at a Whole Foods in Union Square — instead, paying for her lunch.

The compassionate Fourth of July gesture is winning praise after a witness tweeted a photo of the woman bursting into tears in gratitude.

“I’ve been doing this for 23 years,” the officer, Lt. Louis Sojo, told reporters a day later. “This is not the first time I paid for someone’s food.

“I don’t do this all the time, but when you look at someone’s face and you know that they need you and that they’re actually hungry it’s pretty difficult as a human being to walk away from something like that, you know? We weren’t raised like that.”

The officers ride bicycles for the NYPD’s Strategic Response Group and were on detail in Union Square when they stopped in the Whole Foods to grab some cold water and a quick lunch.

The female shoplifter, whose identity has not been revealed, had been stopped by security guards, who called the cops over.

“I asked her ‘What’s going on?'” Sojo recalled. “She told me she was hungry. I looked in her bag,” which held three cardboard takeout containers with food from the buffet.

“And I decided we’ll pay for it.”

The decision was made by the lieutenant and Officers Michael Rivera and Esnaidy Cuevas without a word between them, Sojo said.

“Sometimes cops don’t actually have to have a conversation,” he explained.

“We just look at one another. We tend to read off of one another. We just did like a nod. When I asked that lady what’s going on, she mentioned to me that she needed some food. And we looked at each other like yeah, it wasn’t such a serious crime.

“I didn’t think it was a big deal, but she was extremely emotional, she couldn’t speak,” except to say “Thank you,” he said.

“She just looked at me and said thank you. She was extremely emotionally shocked that we did something for her.”

Cuevas said it’s not uncommon for cops to get a coffee or sandwich for a person in need.

They don’t do it for the attention, he said.

“We just go out there and take it day by day,” Cuevas said.

“If it happens, we just have to do the right thing. We do the right thing for each other at work, why not do it for somebody outside?

“We did not know it was going to get the attention that it has gotten,” Sojo acknowledged. “We’re very low-key individuals and extremely humbled by this. We did not do it for the attention.

“Throughout the city, throughout the state, throughout the country, that’s what cops do. We enforce the law, but we also help people. Unfortunately, the helping part doesn’t get recognized. We’re extremely humbled by this attention.”