Hi,
The cart is not cleared at that point because it also contains the billing / shipping address of the customer, the shipping and payment mehtod he already selected, the coupon code he already entered, etc.
That way, if the person which in the middle of the checkout when he deleted the products of the cart, if he adds again a product to it and go to the checkout, he won't have to enter again everything.
Note also that there is a system to clear the carts periodically with the "Cart retaining period" and "Frequency of the check for the carts" settings of the HikaShop configuration so that old carts will be removed after a while.