Suppose I ask a private eye to find out if my wife is having an affair, they do, and she pays them to keep quiet. Is this against the law of my wife and the private investigator?
It's illegal to "bribe" anyone - the banker, the baker, the candlestick maker.
Perhaps you really mean to ask if the behaviour in your scenario is bribery.
On the face of it, the wife and the private detective seem to have committed offences under the Bribery Act 2010.
The wife, the offence of bribing another person (section 1 Bribery Act), aka 'active bribery': giving a financial advantage (here money) to the private eye to induce or reward the private eye for 'improper performance' of their 'function or activity'.
The private eye, the offence of being bribed (section 2 Bribery Act), aka 'passive bribery': agreeing to and accepting the financial advantage in return for 'improper performance' of their 'function or activity'.
The private eye's 'function or activity' (section 3 Bribery Act) is their work for which they is being paid by the husband to perform in good faith. Section 3 Explanatory Notes.
The private eye's 'improper performance' (section 4 Bribery Act) is the failure to perform the work for the husband according to their contract.
Crown Prosecution and Serious Fraud Office joint guidance on the Bribery Act 2010, improper performance:
... The concept of improper performance (section 4) is central to the general bribery offences and also indirectly to the offence of failure of commercial organisations to prevent bribery, since an offence under section 7 requires a general bribery offence to have been committed.
Improper performance involves a breach of an expectation of "good faith", "impartiality" or "trust" (section 3(3) to (5)) in respect of the function or activity carried out. The test of what is expected is a test of what a reasonable person in the United Kingdom would expect in relation to the performance of the type of function or activity concerned (section 5(1)). ...
This would be fraud
(1) A person who, by any deception, dishonestly--
(a) obtains property belonging to another, or
(b) obtains any financial advantage or causes any financial disadvantage,
is guilty of the offence of fraud.
There is a business agreement between the husband and the private eye. The husband pays the private eye, the private eye does their best to find certain evidence.
If the private eye takes money in order to not do his job, then he is in breach of contract. Probably can be taken to court for damages. The damages would be at least his fee; but if the husband paid $2,000 for the job and the wife paid $10,000 for not doing it, that might be quite acceptable.
There are laws against interfering with someone's business. For example if the wife talked to her husband and convinced him that the private eye cannot be trusted, she would be interfering with the PIs business and that can be illegal. I cannot see her doing this. She is also encouraging the PI to breach his contract.