When a corporation or LLC does business in a state other than its state of formation (known as a foreign state), it is required to register or qualify to do business in that state. When it stops doing business in a state in which it had qualified, it can withdraw from that state.
Although withdrawal is not required, it is to the benefit of the corporation or LLC to do so. Until it formally withdraws, a corporation or LLC remains subject to the foreign state’s annual report, franchise tax, and other compliance obligations. If it fails to comply, it will be subject to monetary penalties which the states can seek to collect.