Why do they wear gloves in baseball

Why do they wear gloves in baseball