Without a wall, they just illegally walk across. In huge numbers. Hundreds of thousands if not millions per year. The wall will slow it to a trickle of very determined persons. And they’ll be more easily detected and caught.
Alcatraz wasn’t perfect either but it was good enough.
Yes, as Scott Adams says, walls create “friction” that slows down travel and funnels people to places where detection may be greater. I like this idea, and who thought steel could not be sawed through? What about an oxy-acetylene wielder? I used to have a job where we cut steel plate. (Of course hauling the tanks across the desert would be a deterrent.