the chinese wall isn't to keep invaders out but to not let them escape once they're in, so your army can chase and slaughter them more easily. that threat is probably more significant than them not getting in in the first place.
basically the invaders were often horse-riders, and as such speed was their primary strength. if you build walls, you slow them down, and therefore take their biggest advantage away.