To play the game of golf.
To write something in as few characters as possible (e.g. in code golf, regex golf)
Having had its source code made as short as possible, as in code golf.