Why US companies don't hire internationally even if they have remote culture?

So I'm a software engineer located in Egypt, and a bunch of companies reach out to me (I have enough experience with Ruby/Rails, and worked remotely with a Candian company) but once they find out that I'm in Egypt, they say we don't hire outside the US. I still don't understand the reason for that? since I always make it clear that I don't mind a contractor contract and I will work at the same timezone. However; they still refuse. Is that for legal reasons? or they're just paranoid about hiring anyone outside the US even if they find him a fit for the role?