When the town Sigtuna was destroyed by the Estonians, the citizens hid their things of great value in a hollow log and threw it in lake Mälaren. The log (called stock in Swedish) floated ashore at the island (holm) in question, and the homeless Sigtuna citizens thought this was the perfect place to settle down.
Legend about the founding of Stockholm