This is actually a very old method of getting criminals to cooperate with law enforcement.
The FBI used to do this with mob guys all the time in the 1980's. Show up, arrest them publicly, put out false newspaper articles saying he was close to flipping. He starts getting heat from the outfit and sooner or later, distrust is sown and suddenly he becomes a marked man. Word gets back to him they put a hit on him, or things get dicey with the underbosses and suddenly, he's like a cat in a cage with nowhere to go - so he turns on his associates in order to save his own life.
Cops used to do the same thing with low level drug dealers. Pressure them to flip on their supplier by pseudo arresting them, taking him away. They'd drive around a bit, then drop him off without cuffs in the middle of the neighborhood in broad daylight. Word gets around what happened, and suddenly the heat gets turned up because now he was seen getting out of a cop car with no cuffs? Must mean he's turned informant. Same thing, he gets too much heat and feels he needs to save himself and flips anyways.
Most criminals who engage in any kind of criminal activity are usually living dangerous lives as it is. Working with the mob? Drug dealing with Mexican cartels? Finance crimes with sketchy people like Jeffrey Epstein? Engaging in credit card fraud with Russian mobsters?
I would say a majority of profitable criminal activity involves dealing with some form of violence or violent people to begin with. Criminals know the inherit risk with what they do or who they're involved with.
Why is it ok that law enforcement get to decide what punishment a criminal should receive? You don't think that has a risk of trending society towards a police state where law enforcement power is not checked at all?
Innocent people getting thrown in jail happens. Say the police give this type of public exposure to an actually innocent person and that innocent person gets convicted. Say a newspaper article reports on the lie that the given innocent person was cooperating with police and that article is read by a big audience. That innocent person runs the risk of being murdered in jail because they have been marked as a snitch by law enforcement.