I imagine that if the custom agents thinks that you are traveling with something dangerous (bomb, poison stuff...), they will dispose of the luggage before asking questions; and serious questions they will have.
If they suspect it is something prohibited but not dangerous, they will probably call you and ask you to personally open the luggage.
This let you decide to declare the prohibited item, and not "lie" to the custom agents; thus maybe just have the item seized (and/or pay a fine) instead of you being taken into custody
(anecdotal) This happened to me last time I returned from Italy (to Canada); I stupidly brought back some ham; I got pulled over at the Canadian custom, and I just told them about it and they throw it away.