Why is this airplane flying in circles randomly?
What you observed is probably a Gulfstream production test flight, either an initial or a snag clearance flight, or possibly a Customer Acceptance from Savannah Air Center, which is a completion center across the ramp from Gulfstream. It could be possibly an experimental test flight if Gulfstream runs experimental flying from Savannah (I think they have a test operation in Wichita), but production flights are far more common.

The manufacturer will have designated test areas by agreement with the appropriate ATC units, with specific boundaries, and they will flight plan into the test area for production test flights (aircraft coming off the line) where a Functional Test Procedure, usually taking several hours to complete, is performed.  The ATC clearance will be to maneuver anywhere within the test borders, with a block altitude clearance they are free to operate within, until they need to go higher or lower for different tests and request a new block. 

The pilot flying will be steering this way and that pretty much randomly, within the test area borders, while the other pilot performs systems tests, and the two of them will do a number of flight tests where they operate the airplane to, but not beyond, it's certification margins (things like stalls, engine shutdown/relights, yaw damper function, anti-ice tests, those sorts of things).  

The airplane will return with or without snags, and the plane will get snags cleared, and go back out for another flight to check the snagged items.  On a corporate aircraft it'll then go on to a Completion Center (usually a separate company selected by the buyer for high dollar corporate a/c) for the interior.

Once the completion Center is done the interior, the customer or a customer's agent is taken on a Customer Acceptance flight before accepting the a/c.  They will go through the cabin to make sure everything is perfect in the cabin, both fit and system wise, getting it fully cold-soaked to make sure valves don't freeze, and subject to pressurization changes that can make interior panel joints open up (and I mean perfect - the slightest flaws in panel fits will be snagged).