They were generally to accommodate and entertain distinguished guests, especially a monarch and/or a royal consort, or other high-ranking aristocrats and state officials, hence the name.
In Great Britain and Ireland in particular, state rooms in country houses were used occasionally, and only rarely all round the year.
At the centre of the facade, the largest and most lavish room (for example at Wilton House the famous Double Cube Room, or as seen at Blenheim Palace), was a gathering place for the court of the important guest.
On the other hand, there were a few houses, and royal palaces, most of them exceptionally large, which were laid out in such a way that the state rooms could be left in their original form, while other rooms were converted to meet the new needs of the 18th and 19th centuries, or where funds were available to simply add on extra wings to meet the new requirements.
On board a ship, the term state room defines a superior first-class cabin.