I've been watching a lot of videos by Americans in Scandinavian countries, and something they often bring up is that Scandinavians rarely jaywalk.The Americans then jaywalk less too because they're afraid Scandinavians know something they don't.
The reason is simple though; pedestrians and drivers have an unofficial agreement to follow the rules.
"I don't jaywalk and in return please respect the traffic lights"
And it really is smartest to follow the traffic laws in Scandinavia because the drivers aren't used to people crossing the street at random and therefore aren't prepared for it. However, they're usually pretty good at letting pedestrians cross even if there aren't any traffic lights nearby.
And also the bikes. Tourists are never prepared for the bikes.