The ball was still in play, which means the team playing defense (the player in the grey uniform) had an opportunity to retrieve the ball, throw it to a teammate, and get the baserunner (the team playing offense, in white-and-orange uniform) Out. But once the fan touched it, the ball is dead, and the baserunner is Safe. Basically, when the fan grabbed the ball, he gave his team an advantage to score.
Feel free to check me on that, though. I only know the most basic of baseball rules for fans, two of which are:
- If the ball lands, will land, or is on the field, do not touch it.
- If the ball is flying through the air and will land in the stands, try to catch it.