Strictly speaking, cannabis isn’t actually legal in the Netherlands but is instead tolerated by Dutch law enforcement. However, the laws surrounding consuming cannabis are rarely enforced and the drug has effectively been decriminalised since the 1970s.
Cannabis was decriminalised partly to ease problems associated with other drugs. At the time, heroin addiction was a huge issue in the Netherlands and Amsterdam was particularly effected by this epidemic. Many areas around the city were infamous for drug trafficking and therefore attracted high levels of crime. As studies showed that moderate cannabis consumption was relatively harmless, the Dutch government decided to reclassify the drug as something akin to alcohol or tobacco rather than treating it like harder substances.
This ruling came into effect in 1976 and meant that the police could focus on targeting more dangerous drugs instead of struggling to enforce the laws related to cannabis. It is also worth mentioning that cannabis was becoming more and more normalised in the Netherlands, especially in Amsterdam and other larger cities where the hippy movement had taken root. In fact, the first cannabis coffee shops in Amsterdam were established (albeit illegally) a few years before this date and became semi-legitimate businesses after 1976.
Although the regulations concerning cannabis have changed over the years, the Dutch government has continued to implement drug policies that primarily aim to reduce harm and maintain the peace rather than punish users. Nonetheless, certified cannabis suppliers (coffee shops) must abide by certain codes in order to avoid sanctions and have to operate under strangely contradictory regulations. For example, it is still illegal to produce, sell or buy large quantities of cannabis, which means that coffee shops have to purchase their stock from illicit sources, but then are allowed to sell the drug to clients in smaller batches.