Bartenders from other countries don't get locked up the moment they enter the US because they served alcohol to someone (a US citizen?) between 18 and 21. The US does not have jurisdiction over alcohol sales in other countries.
In this scenario, what's more likely to be illegal is bringing the item into the country.
It's difficult to make physical analogies to these types of internet laws. What makes them 'tricky' is how they are not physical.
If the consumer goes to a place it is legal, and consumes it there without bringing any back, most people would say ‘meh’. Depending on the product. Hard drugs and sex work, being two common exceptions that some countries get more worked up about even traveling to ‘enjoy’ it.
But ship it back (especially hard drugs or sex workers!), and almost all people get more concerned.
The issue here is exactly why customs typically is a mandatory ‘gate’ for packages AND passengers entering a country.
Similar, one could say, to a giant country level firewall?
And why it is so lucrative for smugglers, which are defacto performing a type of arbitrage eh?
And no before you ask crypto won't solve this because Uncle Sam demands USD stablecoins to have sanctions mechanisms built in and clearing entities that don't implement KYC etc. will find themselves subjected to prosecution in other ways.
If I were to fly to the USA, purchase something that was illegal in my home country (and explicitly state I was going to take it back home), then took it back home - would the vendor be prosecuted?