In aristocratic houses of the 19th Century the largest and best furnished room was often called the state room. When ships began trying to attract high paying passengers with luxurious cabins, those cabins were also called staterooms to attract the sort of people who lived in such houses.