for buying? maybe, but only if your country monitors and supervise prostitution in some way. As much as I don't like it a model where there are licensed brothels could work
Why do you "maybe" think the state should penalize individuals for consensually paying for sex? And isn't it an indefensible hypocrisy to allow sex to be sold but not to be bought? That situation is basically a state-mandated black market.
No, Society (well, Sweden in this case) is against prostitution and want to eliminate or at least minimize it. It's the same with drugs laws or illegal downloads- criminalization of this side or another is just tactics, in this case to hurt prostitutes less
The law in Sweden ensures a black market for sex work. Much like drug laws, sex work can never be eliminated in a free society. The primary consequences of the futile attempt to eliminate these things is to reduce freedom and seriously harm individuals.