You are correct, packages are usually inspected and can technically be seized and the seller knows your name and home address. And there is no guarantee if the package will even arrive or if it will arrive with your product. Sometimes it can be hand delivered by the seller which is even more dangerous. There also isn't a guarantee if it's actually law enforcement who is baiting the wrong-doers into buying a false package. From here you can see that it's too dangerous really to buy illegal goods and counterfeit money. So why do the buyers buy the product. Here's why:
They think they are protected well by using Tails OS and/or a VPN even though they've given their personal information to someone else.
Since many people buying, certain buyers could be naive enough to assume everything would turn out alright and may not know the risk of ordering such items.
Website reviews (which may or may not be accurate) could persuade a user to purchase a product.
They could be buying out of curiosity to see if the dark web markets are scams or actually bring real products.
With the Silk Road (which was pretty genuine) many users bought illegal goods and even after it shutdown, people may still have wanted to continue buying these substances.
In a country where medical drugs are hard to get, certain people may resort to buying these drugs of dark web markets even if they know it is risky.
They may want to see if mystery boxes are truly real and not scams.
They may just want to heavily arm themselves from any threats they have and may resort to buying illegal firearms for protection.
They could be buying a product to use it in a crime for the future.
Their friends or someone they are close to encourages them to buy these products. A group of friends could buy some drugs through the dark web.
The buyer may feel that dark web markets are a safer way to evade law enforcement while obtaining an illegal product.
I've heard of a story where someone bought drugs off the dark web except the sellers murdered their mom and the buyer got charged with drug possession. I've also heard a story where someone wanted to really see if mystery boxes existed, so he ordered one on the dark web for $500 in bitcoin. It ended in him receiving a hand delivered box with a photo album of his family and his parents were killed by the seller. Overall, ordering products on the dark web is too risky and most people just see it as a valid option when in fact it can put them in danger due to the seller being unverified and anonymous (scamming can occur).
Okay, so we understand why users might want to buy illegal substances, but how could they make sure the shipping works. Well, one technique which could be dangerous for the buyer is to hand deliver the package. This could work if there were local dealers with the goods in the buyer's area. The truth is that sellers can't truly and probably won't ensure the seller receiving the package since by that point they already get the bitcoin. They have the ability to scam the user which usually happens. But let's say that this is a known seller who does deliver illegal goods. Then a technique to disguise the product is to wrap it in a legal cover. For example, drugs could be wrapped in a shoe box. However, they can still be seized by law enforcement. In short, darknet merchants can't really do too much to ensure the customer receives the package. They rely on their brand and reviews to get buyers. So the answer to this question is really they can't truly guarantee that the product will come - they can only try to make sure it does if they don't want to scam the buyer and do care about the product arriving and the customer being happy.