When an arrow is on a block with air above it, and the block is moved by a piston, the arrow will stick into adjacent blocks.
When an arrow is on a block with air above it, and the block is moved by a piston, the arrow will stick into adjacent blocks.
The arrow is moving, so this is expected.