Closing a position can stop loss and win, avoiding spot delivery.
Are you talking about compulsory liquidation?
This is a means of risk control. Futures are margin trading and have leverage effect. Futures exchanges or futures companies will only force liquidation when the margin is insufficient, so as to avoid irreparable losses caused by sudden liquidation.