Those methods are executed as part of operations that are wrapped in a transaction, so it is safe to implement them that way.
It is possible to implement queries as one string (queries separated by ;) to reduce code a bit, but this will require huge changes in EntityQueryHelpers, and I am not sure if it is worth it. From a performance perspective, it shouldn't be much worse.
Depends on D14841