When Shanks gives Whitbeard the Wine, it's revealed that it was made in Shank's Hometown in the West Blue.
Guess what island is located in the West Blue? God Valley. Guess where Shanks was found by Roger and his crew? God Valley.
After the God Valley incident, in order to save face, the WG erased the island from maps and history, along with Rocks. However, the island itself was said to be full of natural resources; there's no real reason to destroy the place, when they can mine it.
At some point, Shanks discovered he was a Celestial Dragon, and contacted the government. Shanks has been operating as the ultimate Schibukai, the Gorosei and Imu's secret 8th Pirate Warlord, a Yonkou. Why would Shanks do this?
Because, Shanks wants to limit who finds the One Piece. Shanks WANTS Luffy to find the treasure, and exists as both Luffy's final theoretical obstacle to the treasure, as well as a guard to keep other pirates from reaching it before Luffy. This is also why Shanks didn't go after the One Piece; he knew that he wasn't Joy Boy from Roger, and knew One Piece was Joy Boy's treasure.
Shanks' job is to guide Joy Boy to Roger's treasure, in order to honor his Captain's final, epic voyage.
So, the Celestial Dragons were in a pickle. They finally found Figarland's long lost son... but now he's a fucking pirate, and a strong/famous one at that. Admitting that Shanks was a Celestial Dragon and Pirate would be even worse than Doflamingo coming out, since Shanks LITERALLY SAILED WITH ROGER, THE KING OF THE PIRATES.
However, since Shanks never LEFT the Celestial Dragons, and was simply kidnapped, they couldn't just eliminate him, either. This explains Garling's intro line about those who protect scum becoming worse than scum: his son chose to be a dirty pirate, and run a fleet full of shitty, weak pirates, than live at the top of the world. Shanks is the opposite of Garling; he refuses to hurt people for no reason, and, unlike Celestial Dragons, just laughs when he's insulted.
The CDs realized Shanks would never come back to Mary Geoise, and Shanks realized they couldn't just let him roam free. So, Shanks drops this: "By the way, I know what the One Piece is and how to find it. I don't want anyone to ever find my Captain's treasure... so, how about I work to stop pirates from finding the One Piece? I'll also work with the WG when necessary to prevent war from erupting (hence Shanks stopping Kaido from going to Marineford and trying to stop Ace from going after Blackbeard)."
So, Shanks became an unofficial member of the World Government operating as a pirate to prevent the One Piece from being discovered, and was given God Valley as his unofficial island to have as a base (he probably asked for it). The WG wouldn't let the Yonkou system exist, unless they had some control over it, and Shanks is that force to keep the other Yonkou in line if necessary.
Knowing that his father participated in slaughtering who knows how many innocent people would disgust Shanks, so, he rebuilt the God Valley Kingdom himself, and filled it with weak/poor people who needed help and protection.
Shanks' base is not known to the world, because the Celestial Dragons had to cover up the God Valley incident, making it an ideal pirate base.
This also makes Shanks giving Whitebeard that Sake really hilarious. Shanks gave Whitebeard Sake brewed on the island where the Rocks' pirates were destroyed, and where Shanks' Dad scarred Whitebeard. That's why Whitebeard brought up Garling, he knew Shanks was trolling him.