Think of a weather-protected market inside a shop. That is exactly what the Victorians did and they came up with the department store.
It is more expensive to have a market indoors and so department stores always catered for the more wealthy and provided fashionable items just as they mostly do today.
The modern equivalent of a large department store is a shopping mall.