I don't think the outcome is what makes things like this potentially illegal.
You're not allowed to bribe public officials. You're not going to escape the law by arguing that the bribe didn't get you the result you wanted.
You're not allowed to bribe public officials. You're not going to escape the law by arguing that the bribe didn't get you the result you wanted.