Lore summary:
The original building was made for the first ruler of the kingdom to live in. When the first ruler died his son made a law that future kings could only add on top of the original palace, and never remove parts under any circumstances
Eventually, with the different kings and queens throughout history, all with their own interests, personalities, ect, the building became a gigantic mishmash of random stuff