Peter Mandelson this week suggested that how "we come to grips with the fact that the internet is giving public access to uncorroborated, undigested and unmediated news, all in the name of free speech, is becoming one of the defining issues of the 21st century".

His remarks were occasioned by the public outcry over the Sun's publication of naked photographs of Prince Harry, after they were already available on the internet, to be viewed by anyone in Britain who wanted to look. He has a point. But it's a much wider point than he believes it to be. Philosophically, the web has simply intensified the long-running and pointless pseudo-battle that is libertarianism v authoritarianism.

In recent decades, libertarian arguments have achieved their most concrete success in economics. Deregulation and the relaxed acceptance of people becoming filthy rich were supported by Mandelson and Labour. Indeed, Mandelson's worries about the deregulated internet are largely focused on the loss of profit to the traditional media that has ensued. It would appear that in Mandelson's mind deregulation is good if it creates profit, and bad if it destroys profit. And not only in Mandelson's mind – many share his view.

Mandelson's remark illustrates an assumption that is broadly subscribed to, but rarely directly stated. That profitability is a measure of morality. The reason this idea is rarely voiced out loud, even by its most fervent believers, is because its absurdity is then plain to see. Yet it is exactly the argument chancellor George Osborne repeats when he insists yet again that further taxes on the filthy rich will drive away "wealth creators", wealth creators being inherently good, in both the moral and the practical sense.

I was thinking about these issues earlier in the week, in the light of a new report suggesting that under-18s who smoke cannabis permanently damage their IQs. The market in recreational drugs is, of course, entirely unregulated, being illegal. Yet it is highly profitable too, so it thrives, its illegality adding a sheen of added attraction for risk-lovers (including young people), who are most likely to want to try drugs.

The fact that there is an urgent biological reason why teenagers in particular should be protected from cannabis use ought to be a strong argument for allowing responsible adult cannabis users to have access to a legal market. This would make the illegal market less perversely glamorous, as well as smaller, and therefore easier to police. No doubt, the opposite argument will continue to prevail, however, with adult users likely to be seen even more passionately as The Problem, for supporting an illegal market that puts children at risk (among its many exploitative and barbaric features). Those users, in turn, will decline to change their habits, as they resent laws that limit so severely their individual life choices. Libertarians versus authoritarians – it's complicated.

But a petty incident last Monday, at Edinburgh's Cafe Royal, of all places, finally brought home to me the basic reason why neither regulation nor deregulation is a solution in itself (far from it). Arguments about the relative merits of each – often, wrongly, characterised as left versus right – tend to close down debate rather than fuel it. No wonder. Far from being opposites, they are two extreme aspects of the same problem.

The Cafe Royal is a venerable Edinburgh restaurant – beautiful and expensive. It seemed the perfect place for a family dinner, celebrating a number of Good Things, not least the graduation from university of my 21-year-old stepson and his 22-year-old girlfriend. But we never got to eat. Or drink. The 22-year-old was told she "looked under 25" and would have to show her passport if she wished to be served a glass of wine. The 21-year-old didn't "look under 25", apparently, so he could drink as much as he liked. We made our excuses and left.

This odd turn of events came about because of Challenge 25, a strategy that's encouraged in England, and is sometimes made a mandatory condition of liquor licences on premises with a bad reputation for selling to people who are under 18. The idea is to target both cynical vendors, who claim that underage customers "looked over 18", and help genuinely confused ones, who tend to feel on safer ground when they argue that someone looks under 25 rather than under 18. In Scotland, however, the strategy became mandatory in all premises in 2010 (it passed me by). If someone is challenged about "looking under 25", they have to show their driving licence or passport to be served. If they have neither, then there are ID cards available for anyone who is 18 but "looks under 25" to carry for this purpose.

Used well, the strategy is a clever tool. It is obviously subjective, the question of whether someone "looks under 25", and it's a useful trick up the sleeve when there are other causes for concern. Our waitress could have said nothing at all, or could have informally checked that all those drinking were definitely over 18.

But by slapping Challenge 25 on the table immediately, she accused a blameless young women of trying to procure alcohol while under age, and three other adults of colluding in her crime. A heated discussion with the manager confirmed that he did not understand Challenge 25. He insisted that the "looks under 25" provision was not in the least subjective, that his establishment was under a legal obligation to see the credentials of everyone who ordered drinks while "looking under 25", and that there had been prosecutions for selling alcohol to people who were over 18 but "looked under 25" without appropriate ID.

As far as I can tell, Scotland hasn't gone mad, because I can find no record of any such prosecutions. But the contretemps is a perfect example of the stupidity of enforcing regulation for its own sake, rather than using it intelligently, in this case to target alcohol abuse among under-18s, and those who profit by facilitating it.

All regulation can be counterproductive when applied without disciplined and consensual thought as to what it is there to achieve for society as a whole. It is much more important for aims to be thoroughly understood than for procedures to be slavishly followed. The latter course suppresses individual thought, engagement and responsibility, which is precisely what is so repugnant about authoritarianism. Deregulation, however – as we saw in the banking industry, are now seeing with the internet, and continue to see in the illegal drugs market – gives people an excuse to dispense with disciplined thought about anyone other than themselves, which is also repugnant. Both extremes relieve people of their responsibility to think about the wider consequences of their actions. And that's the last thing human beings need.