The demon’s goal is to “erase” the gas bit by restoring it to 0. But because the underlying laws of physics preserve information, he can restore the gas bit to 0 only by transferring the information in the gas bit to his own bit. The total information remains constant.