I hope the layoff was not an example of age discrimination, which is rampant in the Valley. When I worked at Apple, there was a senior tech writer working in my department who was in his late 70's. I thought that was very cool.
Why would age be a problem? I thought ( most )engineers are better as they age!
They also are worth more, and employers don't want to pay for that, and note Apple's leading role in establishing a non-"poaching" conspiracy to keep salaries down. Less pliable as well, more likely to tell an manager something is impossible, one reason H-1Bs are preferred by so many firms.