If a way is selected, next relation containing this way will be selected (used repeatedly) If a way without linked relation is selected, JOSM will try to find closed polygon of ways starting from this way (useful for making multipolygons). Pressing Shift-/ next time will select next suatible relation or way loop.