I would guess for the second part that the government prohibits it because it could result in unequal opportunities for job seekers based on race. While referrals are more acceptable in non-government-sponsored companies, government-sponsored companies are held to higher standards because that is where taxpayer dollars are directly headed.
If the applicant pool was overwhelming black and Palantir hired more white people because of referrals, there would be more uproar.
Ultimately, the implications would be that if that logic were applied to government positions, (ie, if government positions took into account referrals more than merit) you could end up with a government that is overwhelmingly white and/or arbitrarily discriminates against people applying to positions.