I'm pretty sure that the shipment state machine is not being used in this case.
Your shipment is likely being set to ready by this:
https://github.com/spree/spree/blob/v2.2.1/core/app/models/spree/shipment.rb#L223-L226
which is called from here:
https://github.com/spree/spree/blob/v2.2.1/core/app/models/spree/order_updater.rb#L21
which is coming from:
https://github.com/spree/spree/blob/v2.2.1/core/app/models/spree/payment.rb#L24
Because this is happening through ActiveRecord callbacks, the state machine is not being invoked and your shipment is being set to ready through other means and not triggering your state machine event. You'll probably need to find an alternate place to hook your logic in.