What is the difference between a stateroom and a cabin?

The difference between a stateroom and a cabin, the term stateroom comes from the day of the Steamer George Washington, in the 1830s.

The ship had 26 cabins, and as at the time the USA was a union of only 26 states, each cabin was given the name of a state.

Since then, in some US-based companies/articles, the cabins are called “staterooms” incorrectly while in other countries it is cabins.