You may be able to shoot down the harvester before it arrives but it'll take at least 2 stilettos with sparrowhawks.
In 2.4 base defense was similar to 2.6, just that the location where aliens accumulated wasn't pre-determined.
The 2.5+ AI iterates through all of the team's units and checks for all of them which units they can see/shoot from all of the positions they can reach within the upcoming turn of the unit, though the amount of movement points used is not the maximum, they tend to reserve some for reaction fire and if that's not possible they tend to not attack instead. But if no enemies would be visible from their complete reachable area, they just move to a random position using some 1/3-2/3 of their movement points. Most of the time at least, so this probably is what you call "not attacking". I think it occurred to me at least once that *all* aliens were drifting towards the power plant in 2.6 though, it was over quickly.