At one time I was a hiring manager at a largish global tech company. Not having a degree myself, and noticing that a large number of the top devs in the company also either had no degree or had degrees that were not in any way related to CS I pushed back on HR to pull the 'relevant degree' requirement from our job postings. I was told that I was welcome to recruit, interview and hire people without a college degree, but if we posted the job publicly without the requirement, we would not be able to hire any non-American programmers. The government would see the lack of a degree requirement, even for a sr dev or specialized tech position, to mean it was an entry-level position that any American could do and would deny our visa request if the person we liked best happened to be a foreigner.
I don't know how real the risk is, but it is a perception in HR at big companies.