In the United States, most building departments have two gategories of building permits:
An Outbuilding is defined as a building (a stable, woodshed, pole barn, guest house, etc.) separate from, but accessible to, a main house. An outbuilding may have it's own entrance and exit making it ideal for an office or an apartment.
A two storied outbuilding, with a balcony entrance, may allow guests to have their own private space, and in the winter, can serve as a storage place for garden equipment.