The Berlin Wall like most things constructed by communists was faulty and poorly built.
The Pyramids were well built and still they were raided many times.
Show me an unguarded wall that can't be climbed over, dug under, cut through, blown up, bulldozed over, drilled through, ...
Fences serve certain purposes. They are good at keeping livestock and most animals in or out, like the new one they are building on the New Mexico border to keep diseased Mexican cattle from wandering across the border and infecting American herds.
Fences are good for delineating the border. They let people (especially border guard) know where the border is so they don't accidentally hunt or graze livestock on the wrong land. Bob wired fences are sufficient for this purpose.
Fences are fairly good at preventing vehicles from crossing at points you don't want them crossing. However as any fireman can tell you, chain link fences don't slow down a firetruck responding to an apartment complex fire.
But fences alone can never stop individuals who want to cross.