The raised seams churn the air around the ball, creating high-pressure zones in various locations that (depending on the type of pitch) can cause deviations in its trajectory. It's well known that the movement of a baseball creates a whirlpool of air around it, commonly known as the Magnus effect.
Further Reading Physics can explain the fastball’s unexpected twist, new study finds