When the deque_obj becomes empty, the while loop condition evaluates to False, and the loop exits. This ensures that all elements from the input list are processed and split into chunks.