You were on a network and what you saw was the shared access to other computers on that network. You should not have been at risk, unless you have enabled sharing on your own computer. Even then, you would likely only have been sharing those parts of your drive that you had enabled shared access to. Macs out of the box are not so easily accessible for other computers on the same network, unless it is intentional.