Well that doesn't mean that it's California law that's the problem (California is an “at-will” state like the vast majority of states), but Sun's policies. Usually corporate policies only pays out severance for layoffs, not firings for poor performance, and severance is hardly required under California law.
A lot of white collar employers will usually try to work with poor performers to improve performance, but that's definitely not a given.
>In NZ I was hired via a 90-day trial where the employer could let me go for no reason given within 90 days.
This is extremely common in America too, it's called a "probationary period." My husband didn't even get any benefits during the six month probationary period at his last job.
There's also "contract to hire," which is, again, not uncommon in America. The new employee is employed by an external company for a set period of time and the employer can decide to hire him or her (or not) when the contract ends.
Internships are also used as a "try before you buy." Some employers mostly hire former interns for junior positions, that way they already know their skills and work ethic. I worked at two such companies where the vast majority of juniors were former interns.