I do remember a case in the UK where a man successfully defended his sale of ecstasy to an undercover officer on the grounds that she was very attractive. His argument was that he hoped to have a romantic relationship with her and would never have otherwise sold the drugs.
I mean, even then it's contextual surely. How far can the police go? Can they look around for someone who's having an incredibly tough year financially, and offer them a one-off way to scrape through by selling drugs, even if the opportunity would never arise otherwise? We're in the realm of hyperrealism and state-constructed narratives here.
Yes I imagine it's a consequence of target-based management practices infiltrating the public sphere. The "bad press" blocker works if the media is free and independent. Unfortunately in many countries it is often in the hands of corporate moguls and is co-opted into the exact same narrative building. The CIA famously tried to use the media for their own devious ends. In the UK we had the Hillsborough disaster among many other examples of press cover-ups.