It's not whether it works 100% or not at something, it's that the marketing team aka Trump says it will do even better than that, because his wall is MAGIC.
You're right -- it's magical thinking rather than anything else.
I mean, in serious policy-making you'd start by analysing the problem(s) and then by devising possible remedies and trying to do some cost-benefit analyses. For example, it's by no means clear to me that a physical barrier (be it a wall or slats) is, on its own, going to be a particularly good method of stopping illegal drugs from entering the USA, since you're still going to need surveillance along the border to prevent drugs being transported over the wall) and presumably the more the barrier impedes smugglers, the more it encourages them to use either existing alternative routes or to discover new ones).
So a sensible analysis would look not simply at smuggling (contraband or people) across the Mexican land border but at the whole question of smugglers' routes into the USA. A physical barrier along the Mexican border might be part of a solution, along with several other measures, or it might that the money spent on building and maintaining a physical barrier and the necessary surveillance to stop people simply getting ladders and ropes across it might be better spent on surveillance alone.
After all, the point about walls historically -- the Great Wall of China or Hadrian's Wall -- wasn't simply that they were physical barriers but that they provided a permanent line of garrisons and raised observation points from which invading armies and migrant tribes (as opposed to small groups of smugglers or migrants) could be detected while a long way off, and a road along which troops could move to defend and reinforce points at which they might cross.
They were part of whole strategy, which may or may not be a good one for the present day, now that both sides have rather more sophisticated communications and surveillance systems and methods of transport.
All this, though, is real world thinking about how to fix real world problems. Trump's wall is something else -- a totemic structure to symbolise protection from malign external forces, and maybe also a physical monument to Trump and his desire to be remembered (the same impulse that has made him want to put his name on large buildings all over the world).