Why use sessions for shopping carts?
Sessions are relative to the user's current session and it may be convenient to erase all history in case the session expired/ user is logged out.
Currently, I am learning Django and I am wondering why most courses use sessions for shopping carts instead of storing them to the database.