The law allows parties to freely contract with each other. Extortion takes away one party's ability to contract freely, however, as that party is being unduly influenced. So, yes, the style of communication is one of the reasons what Avenatti did allegedly gave rise to crime.
In the Trump scenario, he had an affair and approached his mistresses with an offer - do not talk about the affair and I will pay you. The mistress had a choice whether to give up something of value (information about the dalliances of a candidate for President) for value or to sell the information to the highest bidder. As long as the mistress was not threatened in anyway, she had the ability to freely decide whether to contract with Trump for her silence or try to sell her story to the media.
The other issue for Avenatti is the amount demanded. His client was a coach of a AAU team that previously was under contract with Nike. For reasons that I do not know, Nike decided to end its contractual relationship with the coach (hmm . . . maybe Nike, after watching the trials of a competitor's employees, decided it wanted to distance itself from similar relationships).
Lets say the contract was breached or Nike acted inappropriately such that the coach was damaged. There likely would not have been anything improper for an attorney to make a settlement demand as long as the demand was based on the actual or suspected damages suffered by the plaintiff. Avenatti's demand does not appear to based on damages suffered by his client; rather, he allegedly made a demand based on the damage the lawsuit would cause Nike. Further, he put his own interests before the interests of his client by including in the demand he requirement that he be retained and paid by Nike to perform an investigation.
Many states have statutes and court rules which prohibit the filing of frivolous lawsuits. This can mean filing a lawsuit in which there is no factual or legal basis supporting it and, in some cases, filing a lawsuit that has some legal basis, but was filed for an improper purpose. So, from that standpoint, it could be "illegal" to threaten a lawsuit if the lawsuit would be deemed frivolous.