Unpaid internships are quite legal in the US as long as the intern is receiving benefits from the arrangement[1] - this means that an unpaid intern running to fetch you coffee and pick up your dry cleaning is
almost certainly illegal in the US. Additionally, unpaid internships are extremely rare in technology right now due to the intense market demands - if you dangle an unpaid internship out in the market you're not going to get very many bites as everyone will either go for prestige focused internships[2] or just an equivalent internship that actually comes with a salary.
In non-tech fields this sort of thing is much more common and, at least when I went through school in the States, the fact that you might have to work an unpaid internship was a reality we all accepted (the cultural perception may have moved on). It's not illegal but it's possible very few HR person would allow such a posting - internships aren't profitable for companies, so most of the unpaid internships were teensy companies that hadn't realized that their interns would actually cost the company money regardless of the salary.
1. Here's the DOL's Fact Sheet including the seven evaluation metrics: https://www.dol.gov/agencies/whd/fact-sheets/71-flsa-interns...
2. Which is it's own problem - working an internship at Google is basically having Game of Thrones on your IMDB page and the FAANG companies do exploit this perceived prestige.