Sequences generate numbers independently of transactions. If a transaction rolls back after taking a value, or values are cached and not used, you get gaps. This is normal; don’t rely on IDs being consecutive.