Actually, it's not required by Swedish law. There would be many free speech issues with such regulation. However, the companies realize that it's in their best interest not to ignore the wishes of the people they want to do business with, so they are generally respected. Some companies who deliver the flyers independently chose to ignore this, most notably real estate agents, pizza places with home delivery and political parties.
Not delivering mail (junk or not) addressed to you would be illegal, though.
Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (8) I'm on the committee and I *still* don't know what the hell #pragma is for.