And what happens when, not if, actually crime happens because of law enforcement involvement or because the sting contributed in some significant way to the crime? We already have an example of the latter with the "Fast and Furious" operation by the ATF (Bureau of Alcohol, Tobacco, and Firearms) contributing just over a couple thousand firearms (they assisted in getting those firearms smuggled over the US border to Mexico untraced and with who knows what else included in the package) to the Cartel wars in Mexico. Those firearms then showed up in numerous murder scenes (over 200 deaths by 2011, as I recall), including the death of a US border agent. The end result was that after two years, some minor characters in the smuggling operation were arrested, but not any important figures in a cartel.
The main problem here is that without the agency of the uncover agent, the crime might not have happened in the first place. But even when we know crime happens, the sting can actually make it worse in various ways (such as creating an easy, predictable route by which to commit additional crimes or enabling criminals to do worse than they could before).