The standard text of a credit card agreement implies American express can terminate the agreement at any time. Problem is, you already gave credit.

As an example, if I give someone a loan, I can't "take back" the loan. A line of credit is no different from a loan. If a customer has a line of credit of 10k, cashes it out, then Amex closes the card this should be the same as if they receive the credit and then the account closes before they cash it out.

If Amex was never intending to allow it to cash out and instead restricts the card before its ever used, this shows dishonesty.

Because a line of credit is money that is effectively already given to the customer, is it legal for Amex to close an account assuming they have no other legal reason and it's purely capricious behavior?

There was an answer citing a Supreme Court case with the answer no. This was deleted for some reason.