Why permanent user store writes updates in separate transaction?

I’m currently working on PermanentUserData.

The yDoc looks like:

text: YText,
users: YMap {
    [userDescription: string]: {
        ids: ClientID[],
        ds: DeleteSet[]
    }
}

I’ve noticed that if a deletion happens, a transaction happens to update the prosemirror object, PermanentUserData listens to the transactions, and will trigger another transaction to store the deleteSet to the users type YMap in another transaction which in next event loop.

This brings difficulty to get update after transaction:

const prevStateVector = Y.encodeStateVector(yDoc);
const text = yDoc.getText('text');
text.delete(0, 1);
const update = Y.encodeStateAsUpdate(yDoc, prevStateVector);

The update is missing a clock. I can try to save the prevStateVector to resolve the problem. But I’m curious about the design. Why permanent user store writes updates in separate transaction?
Git commit link: permanent user store writes updates in separate transaction