Louis XIV, in building the palace, was intent on outdoing Vaux-le-Vicomte. Versailles became the home of the French nobility and the location of the royal court. Louis XIV, himself, lived here -- there were government offices here; as well as the homes of thousands of individuals. By insisting that nobles spend time at Versailles, Louis kept them from countering his efforts to centralize the French government.
While the Palace was grand and luxurious, it was also impossibly expensive to maintain. Historians estimate that maintaining the Palace, including the care and feeding of its staff and the Royal Family, consumed as much as 25% of the entire national income of the country of France.
After the French defeat in the Prussian-French war, the castle was the main headquarter of the German army from 5th October, 1870 until 13th March, 1871, and the German Empire was proclamated here on 18th January.
The ravages of war and neglect over the centuries have left their mark on the palace and its huge gardens. Modern French governments of the post World War II era have sought to repair these damages. They have on the whole been successful, but some of the costlier items, like the vast array of fountains, have yet to be put back completely in service. As spectacular as they might seem now, they were even more extensive in the 18th century. The 18th century waterworks which fed the fountains was probably the biggest mechanical system of its time. The water came in from afar on monumental stone aqueducts, which have long ago fallen in disrepair or been torn down.