Since 1994 "allemansrätten" is part of the constitutional law, securing the right for everyone to go anywhere under certain circumstances (cant stay longer than a couple of nights in the same place, cant stay within eyesight of a permanent resident etc etc)
The fact that this is practical is a consequence of low population density. In places like the Netherlands there practically are no localities where one is outside eyesight of a permanent resident, besides national parks.
Compared to here (high population density, Germany) or say the Alps, where you can use any road used for forestry or farming. The only thing you can't access is small gardens in relatively high density villages.
One explanation I've seen is that if the nobility got to aggressive, Swedish peasants could always go hide in the forest for a while.
...which is something you can do in a low population density land, and we're full circle :)
https://en.wikipedia.org/wiki/Stavnsb%C3%A5nd https://en.wikipedia.org/wiki/Vornedskab
Thing is much of the peninsula due to the climate can support only marginal agriculture and hence only a very limited peasant population. Not enough pop density to establish any sustainable lifestyle for nobility.