Originally, golf balls were smooth; but golfers noticed that older balls that were beat up with nicks, bumps and slices in the cover seemed to fly farther. Golfers, being golfers, naturally gravitate toward anything that gives them an advantage on the golf course, so old, beat-up balls became standard issue.
At some point, an aerodynamicist must have looked at this problem and realized that the nicks and cuts were acting as "turbulators" -- they induce turbulence in the layer of air next to the ball (the "boundary layer"). In some situations, a turbulent boundary layer reduces drag.