In the US I think it's also a retention strategy. Nobody will just up and leave before they have another job lined up because health insurance is unaffordable. One US colleague mentioned $1000 per month!
It's a big deterrent IMO especially compared to Spain where healthcare is free