Purchase of a primary residence is a legally allowable reason under IRS regs to take a hardship withdrawal from a 401k plan, assuming that the 401k plan document allows for hardship deductions at all. It is also possible that the employee might be required to exhaust all loan options prior to taking a hardship withdrawal - however, the employee would have to check into the terms of his or her own plan to know for certain.
If this is not the question please clarify