Retirement tax questions

The plan sets the rules on hardship withdrawals, and it is up to the plan to enforce those rules.  You won't get in trouble if you use the funds for something other than you claim.  Potentially the plan could get in trouble if the IRS determines they don't have proper internal controls.