Could be any switch on the playfield changing state when the ball enters the shooting lane. The game thinks the ball drained and is putting it back in play.
Next time it happens, see if any points are scored when it kicks it out. Typically you can narrow it down to the switch based on the points awarded when this happens.