
The idiom when in Rome, do as the Romans do means that when you are a visitor, either to another country or just someone else's house or working in their business, you should adapt to how everyone behaves and try and fit in as a mark of respect.
Everyone else was taking their shoes off, so when in Rome, do as the Romans do.
