Same way people acquire guns illegally in US states that prohibit gun ownership: involved parties choose to break the law.
> Seems really strange that the government would have bothered decriminalizing consumption if the supply itself is illegal.
These governments take the stance that drug dealers exploit the addictions/circumstances of their customers, exposing them to more harm. So they make selling (or possessing enough that an intent to sell seems probable) illegal.
Because the users are at worst harming themselves (assuming they aren’t doing something like driving while intoxicated, or parenting under the influence, but there are laws that already handle these scenarios), these governments don’t see the point in further harming the users of these drugs by locking them away in prison. So drug use is legal, and possessing a small amount (so small that it would be unlikely you’re selling) is legal. Also, because the use of drugs is not illegal, this makes users more likely to seek help, whether from their community or resources provided by their government.