Any defences reduce the number of attackers, so if nothing else, it makes the defense slightly easier for you.
Though if you build your base competently, it might be just better to have more enemy bodies and loot in the end, especially if they get thrown in one or two large corridors where they all get mass molested with rockets and miniguns.