The issuer of a credit card has the right to terminate/close an account for any reason at anytime. That is part of the customer agreement you agreed to when you submitted your original application.
All banks will close inactive accounts over a period of time. This time period is variable, but generally is around a year. If you haven’t used a credit card in over a year, almost any bank will send a notice of closure.
https://www.goldmansachs.com/terms-and-conditions/Apple-Card-Customer-Agreement.pdf
Page 14/19
BY US
We may suspend or close your Account, or suspend or cancel any feature on your Account, at any time and for any reason permitted under applicable law.
EFFECT OF CLOSING YOUR ACCOUNT
When your Account is closed, you must:
- Return or recycle all physical Cards;
- Stop using your Account to make payments to others and cancel any such payments that may be automatic or recurring; and
- Continue to pay at least the Minimum Payment Due each month until the total outstanding balance of your Account, including any amounts which post after the Account's closure, is paid in full.