Every ball other than the free starter ball has a durability rating. What that means is that they will only last for X amount of shots (not including putts on the green). Apparently, the shot that put you on the green was the last shot in the life of that ball.
Look in the lower right corner of the screen, under the mini-map. There is a durability meter. It goes down with every shot ( excepts putts). When it gets red, it's life is almost over.