Ghost Records: Ghosts in the Database
The database is haunted. Not in a horror movie, but in the DMV sys.dm_db_index_physical_stats. When you delete a row, SQL Server does not necessarily remove it immediately. Instead, it leaves behind a ghost record waiting for the ghost cleanup task to perform its exorcism.
This approach supports transactional rollback and avoids unnecessary disruption during DELETE. The engine prefers to mark a record as deleted rather than immediately rearrange the data page.