Creating thousands or millions of entities and then deleting them does not return your database to its initial state.

Queries won’t show the deleted entities, but operational results can.

For example, a table in an RDBMS may have extra storage segments allocated to it. These can generate higher I/O times until someone runs an analyze job to reset the table stats for the query planner. Some databases treat “DELETE FROM USER” very differently from “TRUNCATE USER”.

Some non-relational DBs use tombstone records to indicate where a deleted entity had been. That’s to facilitate eventual consistency when propagating the deletion overlaps with propagating other modifications.